SOLVED

Nested If function with multiple criteria

%3CLINGO-SUB%20id%3D%22lingo-sub-57582%22%20slang%3D%22en-US%22%3ENested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57582%22%20slang%3D%22en-US%22%3E%3CP%3ECan%20someone%20help%20me%20resolve%20an%20If%20formula%20in%20excel%202010%20please%3F%26nbsp%3B%20I%20have%20a%20workbook%20with%20multiple%20worksheets.%26nbsp%3B%20I'm%20trying%20to%20copy%20the%20cell%20value%20that%20is%20not%20blank%20from%20one%20worksheet%20called%20Payment%20Calc%26nbsp%3Bto%20another%20with%20my%20If%20statement.%26nbsp%3B%20My%20formula%20in%20the%20destination%20cell%20reads%3B%3C%2FP%3E%3CP%3E%3DIF('Payment%20Calc'!B12%26lt%3B%26gt%3B%22%22%2C'Payment%20Calc'!B12%2CIF('Payment%20Calc'!B27%26lt%3B%26gt%3B%22%22%2C'Payment%20Calc'!B27%2CIF('Payment%20Calc'!D19%26lt%3B%26gt%3B%22%22%2C'Payment%20Calc'!D19%2C'Payment%20Calc'!D33))).%26nbsp%3B%3C%2FP%3E%3CP%3EUnfortunately%2C%20when%20B12%2C%20B27%20and%20D19%20are%20all%20blank%2C%20D33%20will%20not%20populate%20in%20the%20cell%20with%20the%20formula.%26nbsp%3B%20The%20first%20three%20cells%20work%20fine%20when%20one%20of%20them%20has%20a%20value.%26nbsp%3B%20I've%20researched%20the%20problem%20accross%20multiple%20resources%20and%20have%20been%20unable%20to%20resolve%20on%20my%20own.%26nbsp%3B%20Thanks%20in%20advance%20if%20someone%20can%20help%20with%20a%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-57582%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20%26amp%3B%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENeed%20Help%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-58000%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-58000%22%20slang%3D%22en-US%22%3EYou%20are%20welcome%2C%20no%20problem%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57990%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57990%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20are%20a%20GENIUS%20Sergei!%26nbsp%3B%20Thank%20you%20very%20much!!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20adjusted%20my%20formula%20to%20look%20for%20D9%20instead%20of%20D19%2C%20and%20copy%20D19%20if%20D9%20was%20not%20empty%2C%20the%20problem%20was%20solved.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20so%20very%20much!!!%26nbsp%3B%20%3A-)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57923%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57923%22%20slang%3D%22en-US%22%3E%3CP%3EI%20guess%20the%20issue%20is%20with%20D19%20cell.%20MAX()%20of%20three%20blank%20cells%20(with%20%22%22)%20returns%200%20(zero)%2C%20not%20blank.%20Perhaps%20you%20have%20custom%20format%20for%20the%20cell%20and%20it%20shows%20you%20empty%20cell%2C%20not%20blank.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20copied%20your%20D19%20value%20into%20another%20workbook%2C%20it%20gives%20zero.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57916%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57916%22%20slang%3D%22en-US%22%3E%3CP%3ENope%2C%20i%20didn't%20test%20-%20your%20workbook%20is%20protected.%20But%20i'll%20try%20on%20my%20own%20file%20with%20simular%20formula%20bit%20later.%20In%20general%20it%20shall%20work%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57910%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57910%22%20slang%3D%22en-US%22%3E%3CP%3EYou're%20right%20Sergei...%20Thanks%20for%20pointing%20that%20out.%26nbsp%3B%20I%20did%20that%20this%20morning%20before%26nbsp%3BI%20cleaned%20up%20the%26nbsp%3Bexcel%20to%20attach%20to%20this%20forum.%26nbsp%3B%20Unfortunately%20that%20wasn't%20the%20issue%20and%20the%20problem%20persists%20as%20you%20can%20probably%20see.%26nbsp%3B%20Have%20you%20tested%20it%20with%20the%20corrected%20'Payment%20Calc'!D33%20statement%20too%3F%26nbsp%3B%20It%20doesn't%20seem%20to%20work%20for%20me%20regardless%20of%20the%20last%20argument%20placed%20in%20the%20formula.%26nbsp%3B%20%3A-(%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20trying%20Sergei.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57905%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57905%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20your%20file%20in%20formula%20for%20Credit%20Report%20D10%20is%20just%20D33%20if%20all%20blanks.%20It%20shall%20be%20'Payment%20Calc'!D33%20-%20as%20in%20your%20first%20message%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57897%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57897%22%20slang%3D%22en-US%22%3E%3CP%3EThey%20are%20all%20have%20formulas%20and%20they%20all%20read%20as%20False.%26nbsp%3B%20That%20said%2C%20the%20first%20three%20conditions%20do%20result%20in%20their%20values%20being%20copied%20into%20the%20destination%20cell%20when%20they%20have%20data.%26nbsp%3B%20For%20some%20reason%20the%20final%20condition%20will%20not%20populate%20even%20if%20I%20adjust%20the%20formula.%26nbsp%3B%20So%20strange.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attached%20my%20workbook%20in%20hopes%20you%20can%20replicate%20the%20issue.%26nbsp%3B%20The%20destination%20cell%20with%20the%20If%20statement%20in%20question%20is%20in%20D10%20on%20the%20Credit%20Report%20tab.%26nbsp%3B%20The%20Payment%20Calc%20tab%20has%20the%20four%20cells%20the%20If%20statement%20is%20targeting.%26nbsp%3B%20Two%20of%20the%20cells%20have%20imbedded%20If%20formulas%20and%20the%20other%20two%20have%20imbedded%20Max%20formulas.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-57606%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20If%20function%20with%20multiple%20criteria%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-57606%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20formula%20appears%20to%20work%20fine%20when%20I%20replicate%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20you%20say%20the%20other%20cells%20are%20%22blank%22%20can%20you%20check%20by%20doing%3C%2FP%3E%3CP%3E%3DISBLANK(B12)%3C%2FP%3E%3CP%3E%3D%3CSPAN%3EISBLANK(B27)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3D%20ISBLANK(D19)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThey%20should%20all%20show%20TRUE%20if%20truly%20blank%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Can someone help me resolve an If formula in excel 2010 please?  I have a workbook with multiple worksheets.  I'm trying to copy the cell value that is not blank from one worksheet called Payment Calc to another with my If statement.  My formula in the destination cell reads;

=IF('Payment Calc'!B12<>"",'Payment Calc'!B12,IF('Payment Calc'!B27<>"",'Payment Calc'!B27,IF('Payment Calc'!D19<>"",'Payment Calc'!D19,'Payment Calc'!D33))). 

Unfortunately, when B12, B27 and D19 are all blank, D33 will not populate in the cell with the formula.  The first three cells work fine when one of them has a value.  I've researched the problem accross multiple resources and have been unable to resolve on my own.  Thanks in advance if someone can help with a solution.

8 Replies
Highlighted

Hi

 

the formula appears to work fine when I replicate it.

 

When you say the other cells are "blank" can you check by doing

=ISBLANK(B12)

=ISBLANK(B27)

= ISBLANK(D19)

 

They should all show TRUE if truly blank

Highlighted

They are all have formulas and they all read as False.  That said, the first three conditions do result in their values being copied into the destination cell when they have data.  For some reason the final condition will not populate even if I adjust the formula.  So strange. 

 

I've attached my workbook in hopes you can replicate the issue.  The destination cell with the If statement in question is in D10 on the Credit Report tab.  The Payment Calc tab has the four cells the If statement is targeting.  Two of the cells have imbedded If formulas and the other two have imbedded Max formulas.

Highlighted

Hi,

 

In your file in formula for Credit Report D10 is just D33 if all blanks. It shall be 'Payment Calc'!D33 - as in your first message

Highlighted

You're right Sergei... Thanks for pointing that out.  I did that this morning before I cleaned up the excel to attach to this forum.  Unfortunately that wasn't the issue and the problem persists as you can probably see.  Have you tested it with the corrected 'Payment Calc'!D33 statement too?  It doesn't seem to work for me regardless of the last argument placed in the formula.  :-(

 

Thanks for trying Sergei. 

Highlighted

Nope, i didn't test - your workbook is protected. But i'll try on my own file with simular formula bit later. In general it shall work

Highlighted
Best Response confirmed by keyservices (New Contributor)
Solution

I guess the issue is with D19 cell. MAX() of three blank cells (with "") returns 0 (zero), not blank. Perhaps you have custom format for the cell and it shows you empty cell, not blank.

 

I copied your D19 value into another workbook, it gives zero.

Highlighted

You are a GENIUS Sergei!  Thank you very much!!

 

When I adjusted my formula to look for D9 instead of D19, and copy D19 if D9 was not empty, the problem was solved.

 

Thank you so very much!!!  :-)

Highlighted
You are welcome, no problem