How to sort table in MS Word 2003 by cell colour
Thread poster: Samuel Murray

Samuel Murray  Identity Verified
Netherlands
Local time: 15:43
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:
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]


 

Heinrich Pesch  Identity Verified
Finland
Local time: 16:43
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  Identity Verified
Slovenia
Local time: 15:43
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)  Identity Verified
Netherlands
Local time: 15:43
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  Identity Verified
Netherlands
Local time: 15:43
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  Identity Verified
Slovenia
Local time: 15:43
German to Slovenian
+ ...
Sort by colour Sep 11, 2015

How many lines do you have?

 

Samuel Murray  Identity Verified
Netherlands
Local time: 15:43
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]


 

Adrien Esparron
Local time: 15:43
Member (2007)
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 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!


 


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

Advanced search






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
SDL Trados Studio 2019 Freelance
The leading translation software used by over 250,000 translators.

SDL Trados Studio 2019 has evolved to bring translators a brand new experience. Designed with user experience at its core, Studio 2019 transforms how new users get up and running and helps experienced users make the most of the powerful features.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search