Using Macro for conditional formatting

Closed
RA - Jan 1, 2012 at 08:01 AM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jan 2, 2012 at 01:27 AM
Hello,

Im in desperate need of help!!! I have an excel sheet with a list of employee number,rank,primary schedule, and secondary sched, years of experience and annual salary. I'm asked to use VBA that changes the font color of the salaries to red for any faculty member whose rank is either senior lecturer or senior professor and has less than 9 years of experience. the table ranges from A2:G29, the rank is in B2:B29, and years of experience is F2:F29......THANK YOU SO MUCH!

1 reply

venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 810
Jan 2, 2012 at 01:27 AM
the data is like this from columnsA to F
A B F
name rank experience
a lecturer 3
s senior lecturer 10
d professor 8
f lectuer 12


highlight column A from a to f
in conditinal formatting window

the cell value is

the next window

=AND(OR(B3="professor",B3="senior lecturer"),F3>9)
choose format-patern choose color
click ok
click ok

I assume that column F from F2 down are numbers
0