I am struggling to get some VBA code to run properly (or even run at all, frankly) - it keeps flagging errors, and no matter what I try to adjust it, it will not execute. I have successfully tinkered with code in the past, but this is the first time I've attempted to write something more-or-less from scratch with only basic sections pulled off the internet (as I could not find anything designed to do this sort of thing), so I may be missing something quite fundamental.
The intent is to change the colour of cells in a table based on whether the value of the first column exceeds the number in the row header. I have provided a snapshot of my spreadsheet for reference:
\1
If the value in column C is less than or equal to the value in row 1, the corresponding cell colours in D2:H16 should match the colour in column J. If the value is greater, the cell should be light grey. I have a chart with formatting tied to the cell colours, so I need to change the colour of the cell itself, not apply a conditional formatting rule.
Here is my attempt at coding:
Any help would be very much appreciated!![]()
Please Login or Register to view this content.
Bookmarks