ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   exclude cells from calculation if custom format (https://www.excelbanter.com/excel-programming/383730-exclude-cells-calculation-if-custom-format.html)

sandycity

exclude cells from calculation if custom format
 
Have column of calculated figures, some of which have manually set custom
format to a different colour. How can I NOT include these when doing further
calculations, eg. am searching array using vlookup and if statments but if
result is cell with custom colour want to give warning message.

Tom Ogilvy

exclude cells from calculation if custom format
 
if you are just using worksheet formulas, then the have no cognizance of cell
color. (although you could write a UDF in VBA to return the value of the
color index).

If you are using code, just examine the cell for its interior.colorindex

--
Regards,
Tom Ogilvy



"sandycity" wrote:

Have column of calculated figures, some of which have manually set custom
format to a different colour. How can I NOT include these when doing further
calculations, eg. am searching array using vlookup and if statments but if
result is cell with custom colour want to give warning message.


sandycity

exclude cells from calculation if custom format
 
Thanks Tom,
I was hoping that there was a way to do it on the worksheet, but I guess to
have to try to put the calculations into code.

"Tom Ogilvy" wrote:

if you are just using worksheet formulas, then the have no cognizance of cell
color. (although you could write a UDF in VBA to return the value of the
color index).

If you are using code, just examine the cell for its interior.colorindex

--
Regards,
Tom Ogilvy



"sandycity" wrote:

Have column of calculated figures, some of which have manually set custom
format to a different colour. How can I NOT include these when doing further
calculations, eg. am searching array using vlookup and if statments but if
result is cell with custom colour want to give warning message.



All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com