individual formatting cell in a range
What I am trying to figure out is if I state a range being say from $A$1:$A$100, each containing a date.
How do you then do an IF function in VBA so that if a date entered is which is either less, equal or greater than a stated date, the cell colour and text formatting is changed accordingly in real time.
The conditional formatting tool on this occasion is not applicable due to the data being copied and pasted from other sources.
I can think of two things that might work for you.
- Use a Worksheet_Change macro that does what you describe. This event handler will fire whenever a cell in that worksheet changes and you can test and do formatting if desired. Remember that it will fire for all changes to all cells in that sheet, so you will need to make it be pretty selective.
- You mentioned that pasting from other sources didn't solve the problem. I presume that's because you were also copying formatting. If that's true, try Paste Special and only paste the value. If you have already applied conditional formatting to the cell(s), that should be left intact and will reflect the color of the date.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1