Please follow instruction in post #44 detailing what you shoud do before clicking the button to update the conditional formatting.There is an error when i hit the button in the #47 provided attachment
it says run time error 1004
application defined or object defined error
how to combine these functionsA guess. See conditional formatting in ranges A1:F10 and H1:M10 of the attached.
The attached is vletm's file with additional sheets:can it be done inside of cell rather than borders
like previously given image
giving shapes inside the the cell
I cannot understand the colour coding required from either the workbook attached to msg#61 (the conditional formatting is all over the place) or from the picture. Not a hope.
The attached is vletm's file with additional sheets:
Sheet3 is vletm's original border-colouring solution
Sheet4 uses an adapted version of vletm's code but places shapes on each cell instead, keeping vletm's colour coding. You can compare the results on Sheet3 and Sheet4 easily.
Sheet5 is where I've taken out the extra rows since they're not needed for colouring anymore.
This means you'll be able to keep the conditional formatting for comparing two tables, and you no longer need the conditional formatting for the 4 cells around each number.
There's a little flexibility to adjust how the shapes are placed on the sheet:
1. The thickness of each line can be adjusted; in Module 1, macro blah, there's a line:
Thickness = Application.Min(.Width, .Height) * 0.2
The 0.2 here means 20% of the height or width of the cell, whichever is the smaller.
When the value is .05 (=5%) you get:
View attachment 62478
When it's 0.3 (=30%) you get:
View attachment 62479
2. You can move the shapes away from the edges of the cell to introduce a bit of (currently white) space between cells.
There's a line just below the one mentioned in (1.) above:
ofset = 0
When this has a value of zero, the shape goes right to the edge of the cell as in the pictures above.
When the value is 1 you get:
View attachment 62480
Each time the button is clicked, some 300 shapes get added to the sheet; if they're not removed before clicking the button again the numbers of shapes on a sheet can quickly get into the thousands, so there's another button to remove them.