bobsan42
Well-known Member
- Joined
- Jul 14, 2010
- Messages
- 2,114
- Office Version
- 365
- 2019
- 2016
- 2013
- Platform
- Windows
Hello guys
I wasn't expecting to post a question here, but here it is:
related to another post here (https://www.mrexcel.com/forum/excel...ng-cell-value-based-another-cells-colour.html) I decided to make a small UDF to determine the color of a cell.
At first it all went well:
No problem here - I enter the formula in a cell =CellColor1(E15), select the cell to inspect and I get the result as expexted.
However - next thing I decided was to get the actual color set by conditional format. So I change to this:
I refresh the formulas in the sheet and I end up with #VALUE ! error instead.
So I check it in the Immediate window:
And there I got the expected result: 16777215
But the cells with the function still show a #VALUE ! error ???!!!
Any ideas?
BTW - currently working on Win10 + Office 365 ProPlus
I wasn't expecting to post a question here, but here it is:
related to another post here (https://www.mrexcel.com/forum/excel...ng-cell-value-based-another-cells-colour.html) I decided to make a small UDF to determine the color of a cell.
At first it all went well:
Code:
Function CellColor1(rng1 As Range)
CellColor1 = rng1.Interior.Color
End Function
However - next thing I decided was to get the actual color set by conditional format. So I change to this:
Code:
Function CellColor1(rng1 As Range)
CellColor1 = rng1.DisplayFormat.Interior.Color
End Function
So I check it in the Immediate window:
Code:
?CellColor1(activecell)
But the cells with the function still show a #VALUE ! error ???!!!
Any ideas?
BTW - currently working on Win10 + Office 365 ProPlus
Last edited: