ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   custom function with conditional formatting? (https://www.excelbanter.com/excel-discussion-misc-queries/241013-custom-function-conditional-formatting.html)

Steve

custom function with conditional formatting?
 
I often have to test a large number of cells to see if they're equal. I
usually use a-b or =a=b and check if the answer is either zero or true. If
not I know they're not equal. It would be nice if I could do this with a
custom formula that would also turn the background red, for example, if the
answer isn't either zero or true.

I doubt this can be accomplished with a custom formula, though, since
formulas are meant to return values, not "do something".

Pete_UK

custom function with conditional formatting?
 
You can use formulae in conditonal formatting by selecting Formula Is
rather than Cell Value Is in the first dialogue box. However, in your
case you can just use Cell Value Is then Equal to then zero and set
the format you want. If you do this on the first cell with that
formula, then when you copy it down it will apply to all cells.

Hope this helps.

Pete

On Aug 28, 3:10*pm, Steve wrote:
I often have to test a large number of cells to see if they're equal. *I
usually use a-b or =a=b and check if the answer is either zero or true. *If
not I know they're not equal. *It would be nice if I could do this with a
custom formula that would also turn the background red, for example, if the
answer isn't either zero or true.

I doubt this can be accomplished with a custom formula, though, since
formulas are meant to return values, not "do something".



Karin

custom function with conditional formatting?
 


"Steve" wrote:

I often have to test a large number of cells to see if they're equal. I
usually use a-b or =a=b and check if the answer is either zero or true. If
not I know they're not equal. It would be nice if I could do this with a
custom formula that would also turn the background red, for example, if the
answer isn't either zero or true.

I doubt this can be accomplished with a custom formula, though, since
formulas are meant to return values, not "do something".


Karin

custom function with conditional formatting?
 
Format Conditional Formatting
If you need to see if column B is equal to column A, and mark column Bi if
is NOT equal, then: in B1 (if data begins there) do conditional formatting as
follows and then copy to entire column
Cell Value Is Not Equal to A1 and change format to anything you like (red
font or red background, etc)

"Steve" wrote:

I often have to test a large number of cells to see if they're equal. I
usually use a-b or =a=b and check if the answer is either zero or true. If
not I know they're not equal. It would be nice if I could do this with a
custom formula that would also turn the background red, for example, if the
answer isn't either zero or true.

I doubt this can be accomplished with a custom formula, though, since
formulas are meant to return values, not "do something".


Steve

custom function with conditional formatting?
 
I already know how to do conditional formatting.

"Karin" wrote:

Format Conditional Formatting
If you need to see if column B is equal to column A, and mark column Bi if
is NOT equal, then: in B1 (if data begins there) do conditional formatting as
follows and then copy to entire column
Cell Value Is Not Equal to A1 and change format to anything you like (red
font or red background, etc)

"Steve" wrote:

I often have to test a large number of cells to see if they're equal. I
usually use a-b or =a=b and check if the answer is either zero or true. If
not I know they're not equal. It would be nice if I could do this with a
custom formula that would also turn the background red, for example, if the
answer isn't either zero or true.

I doubt this can be accomplished with a custom formula, though, since
formulas are meant to return values, not "do something".



All times are GMT +1. The time now is 05:24 AM.

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