I want to do a very similar action, but I need to format a cell that may contain a "<" character. Specifically, I want to compare D7, which may be <1.00, or 5.00, or 21000, to C6, which is always a specific number. I need to format D7 to be bold red text if it is greater than C6.
The problem occurs because of the "<" character that is sometimes in D7.
Select D7 and active the Conditional Format dialogue...I want to do a very similar action, but I need to format a cell that may contain a "<" character. Specifically, I want to compare D7, which may be <1.00, or 5.00, or 21000, to C6, which is always a specific number. I need to format D7 to be bold red text if it is greater than C6.
The problem occurs because of the "<" character that is sometimes in D7.
Select Formula is and enter formula: =IF(ISNUMBER(D7),D7,MID(D7,2,255)+0)>C6
Click Format and choose your font attributes....
Click Ok.
Click oK again to finish.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
I'm going to have to study the formula to figure out what it's doing, but it works! Thanks very very much!
No problem!
The formula is first checking to see if D7 is a number (ie. no funny chars, etc included)...if so it compares D7 with C6, otherwise it compares the part of D7 after the 1st character with C6. Note: The +0 coerces the string (which is currently considered text) to a number so it can compare against number in C6.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
waymegelli,
Please read forum rules below. You should always start a new thread if you have a question. I've moved it for you this time
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks