Hello everyone,
I hope you can help.
I have a macro that when I highlight a group of data it fills any blank cells in orange which is fantastic and works perfectly (code below).
However my next step is that I would like any blank cells under the column heading 'Actual Cost Net' to be coloured in grey and any other blank cells in the highlighted data to be coloured in orange (as it is now) - does anyone have any tips they could give me please?
The column will always have the same name but will change column letters depending on the data. It will be part of my highlighted data as it is a table and I don't want it grey to the bottom of the page.
My current code is:
Sub Highlight_Blanks()
'
' Fill any cells which are blank
'
Dim cLoop As Range
For Each cLoop In Selection.Cells
If cLoop.Value = "" Then cLoop.Interior.Color = 49407
Next cLoop
End Sub
I am struggling with the wording for it to recognise the column named this and change the rule accordingly.
Thanks in advance.
Jessica
Bookmarks