ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Font Colour Macro (https://www.excelbanter.com/excel-programming/373216-font-colour-macro.html)

Sukh

Font Colour Macro
 
Dear All,

I am looking to write a macro for one of my procedures that i have to do on
a monthly basis. I have various spreadsheets with trainee information,
downloaded from our central database. The trainees are identified using a
unique id.

Due to the nature of the report, the spreadsheet can have duplicate
information. The main row for the trainee is in the normal black font
colour, and in any subsequent lines for the same trainee, the font is changed
to red.

Waht i was hoping to do is create a macro, that will count the number of
instances for a paticular trainee, check if there are any red lines, and with
each red line, change the value of the trainee id by adding a 1 or 2 to the
end of the line, for example;
Before Macro
Column A Column B
0001 John Smith
0001 John Smith
0001 John Smith

After Macro
Column A Column B
0001 John Smith
00011 John Smith
00012 John Smith

I hope this has been clear. Thanks in advance

Carim

Font Colour Macro
 
Hi,

Take a look at Chip's brilliant solution

http://www.cpearson.com/excel/colors.htm

HTH
Cheers
Carim



All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com