Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell Replace/Change Font

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
I need to change the name of an item in a Excel cell and then change its colour - repeatly.

But dont know how any items are in the Worksheet.

i.e. its peoples initials; want to just add initials (when creating/editing) then have VBA globally replace the initials to full name and have males in Blue and females in Red.

I can do a global replace, but need to change the font as I process each one, could do a For Loop but how do you know how many there is?? The initials can appear many timese.g. JF 6 times, RS 3 times.
 
How would the code know if the name is male or female?

If there is a criteria, it can be done quite simply using the worksheet feature -- Format/Conditional Formatting -- No VBA Code.

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top