Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Formula to check if cells contain a value

Status
Not open for further replies.

wayneryeven

Technical User
May 21, 2004
101
GB
Hey guys
I have this formula in a cell O14:

=IF(ISBLANK(A14),"",MAX(IF(A14=A13,S13,$C$3)))

Basically checks if A14 is blank then have no value else if A14=A13 use the value in S13 else use the value in C3.

What i would like to do is add another check in that says if there is a value in C14 then O14= C14 (Though keeping the check to see if A14 has a value etc). If C14 is blank then carry on with "IF(A14=A13,S13,$C$3)))"

Is this possible?


 



Hi,

You can use the AND and OR functions to require BOTH...
[tt]
=IF(OR(ISBLANK(A14),ISBLANK(C14),)"",MAX(IF(AND(A14=A13,O14=C14),S13,$C$3)))
[/tt]
Which says

if EITHER are blank then nothing (if BOTH are NOT blank then...)

if BOTH meet the equality test then...

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
there's a typo in there
=IF(OR(ISBLANK(A14),ISBLANK(C14)),"",MAX(IF(AND(A14=A13,O14=C14),S13,$C$3)))
not sure i see what you achieve with MAX here?

;-)
If a man says something and there are no women there to hear him, is he still wrong? [ponder]
How do I get the best answers?
 



My comma was misplaced, sorry.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 



Thanks for the catch loomah.

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I always want A14 to contain a value, BUT if there is a value in C14 then use this one?

The above is great but im thinking it only works on satisfaction if both cells contain a value?
 



Well, did you try to change the formula to do what you want it to do?

Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top