How to sort table in MS Word 2003 by cell colour
Thread poster: Samuel Murray
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 01:17
Member (2006)
English to Afrikaans
+ ...
Sep 11, 2015

Hello everyone

Do you know of a macro that will sort a table by the cell colour of the sort-by column? I know that I can do this in Excel 2010, and it would appear that it may be possible in Word 2010 as well, but I would like to do it in Word 2003. Do you know of a way?

The table I'm trying to sort, is this type:
... See more
Hello everyone

Do you know of a macro that will sort a table by the cell colour of the sort-by column? I know that I can do this in Excel 2010, and it would appear that it may be possible in Word 2010 as well, but I would like to do it in Word 2003. Do you know of a way?

The table I'm trying to sort, is this type:
http://wikisend.com/download/172728/sample%20file.doc
I want to sort it so that all purple coloured cells are grouped together.

Thanks
Samuel


[Edited at 2015-09-11 10:12 GMT]
Collapse


 
Heinrich Pesch
Heinrich Pesch  Identity Verified
Finland
Local time: 02:17
Member (2003)
Finnish to German
+ ...
That I would like to know too :) Sep 11, 2015

Often I would like to remove cells from External Review files with green or brown background color.

 
andrejc
andrejc  Identity Verified
Slovenia
Local time: 01:17
German to Slovenian
+ ...
Sort by colour Sep 11, 2015

Perhaps one of the options would be to copy table into Excel (even if it is a newer version), do the sorting and than copy the sorted table back to Word (2003). I did not find it in Word (2007)

[urejeno ob 2015-09-11 11:40 GMT]


 
2nl (X)
2nl (X)  Identity Verified
Netherlands
Local time: 01:17
Something like this? Sep 11, 2015

You are familiar with VBA, aren't you?

Something like this should do the trick:

For every cell in column(4)

if background colour = purple, cell.text = "mod"
elseif background colour = yellow, cell.text = "fuzzy"
elseif background colour = green, cell.text = "exact

Next


 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 01:17
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
@2nl Sep 11, 2015

2nl wrote:
You are familiar with VBA, aren't you?


My "familiarity" with VBA does not extend to knowing VBA syntax, no.


 
andrejc
andrejc  Identity Verified
Slovenia
Local time: 01:17
German to Slovenian
+ ...
Sort by colour Sep 11, 2015

How many lines do you have?

 
Samuel Murray
Samuel Murray  Identity Verified
Netherlands
Local time: 01:17
Member (2006)
English to Afrikaans
+ ...
TOPIC STARTER
@Andrejc Sep 11, 2015

andrejc wrote:
Perhaps one of the options would be to copy table into Excel...


Yes, but that is an option that I would like to avoid. It works (I can copy/paste from Word 2003 to Excel 2010 and back, but it requires careful mousework otherwise the table breaks, and pasting from Excel messes with the cell margins of the table in Word).

andrejc wrote:
How many lines do you have?


I'm not sure I understand the question. The tables can be of any size (rarely more than 2000 lines, though).


[Edited at 2015-09-11 13:45 GMT]


 
Platary (X)
Platary (X)
Local time: 01:17
German to French
+ ...
Some ideas Sep 14, 2015

I'm afraid it's not possible with Word 2003 because it's very difficult to return the fields background color value (and then do a numeric sort).

Even if it's not "your" solution, you can do it with Excel 2003 :

http://datapigtechnologies.com/blog/index.php/sort-by-color-in-excel-2003/

To avoid the pasting back problems in W
... See more
I'm afraid it's not possible with Word 2003 because it's very difficult to return the fields background color value (and then do a numeric sort).

Even if it's not "your" solution, you can do it with Excel 2003 :

http://datapigtechnologies.com/blog/index.php/sort-by-color-in-excel-2003/

To avoid the pasting back problems in Word, you can use the Paste special function with link to the Excel worksheet after having sorted it.

I tried with your sample with the 2003 versions and it works.

Have fun!
Collapse


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

How to sort table in MS Word 2003 by cell colour






Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »
Trados Business Manager Lite
Create customer quotes and invoices from within Trados Studio

Trados Business Manager Lite helps to simplify and speed up some of the daily tasks, such as invoicing and reporting, associated with running your freelance translation business.

More info »