Hi all you Excel wizards; I am having a problem with a macro that refuses to do as its told! I have looked through other threads but can't find a solution that suits my issue...
I have a variable "Initials", that picks up a certain cell's contents; the cells contain guess what - initials in plain text - i.e. "BF"
When I use:
Columns("E:H").Select '(range I want to format)
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, Formula1:="=" & Initials '(with formatting instructions following)
No cells that contain the text "BF" are formatted - when I then look at the conditional formatting rule in the spreadsheet for the range I see from the criteria that is picked up is Cell Value = BF - not "BF" (i.e. quotes are missing)
How do I wrap quotes around my variable (or do something else) so that it recognizes the text in the cell my variable is allotted?
I am sure I have overlooked something simple; however, your speedy response will be gratefully received - should you require further information please respond - thx...
Bookmarks