Excel/iferror issue


Hi Tom

I place the following formula into a blank cell and press enter.  If there is data to be returned the formula will return it.  If there is no data to be returned, the formula will return nothing; leaving the destination cell blank.  I there is no data to be returned, I would like the formula to return “no figures”

If there is no data to be returned the formula does not return an error so I cannot use the “iferror” condition.

Could explain how I can get the formula to return “no figures” in the event that there is no data to be returned?

=IF(AND(L2=7,L1="Aut 1"),VLOOKUP(F2,year7progress,7,FALSE),IF(AND(L2=7,L1="Aut 2"),VLOOKUP(F2,year7progress,17,FALSE),IF(AND(L2=7,L1="Spr 1"),VLOOKUP(F2,year7progress,27,FALSE),IF(AND(L2=7,L1="Spr 2"),VLOOKUP(F2,year7progress,37,FALSE),IF(AND(L2=7,L1="Sum 1"),VLOOKUP(F2,year7progress,47,FALSE),IF(AND(L2=7,L1="Sum 2"),VLOOKUP(F2,year7progress,57,FALSE), IF(AND(L2=8,L1="Aut 1"),VLOOKUP(F2,year8progress,7,FALSE),IF(AND(L2=8,L1="Aut 2"),VLOOKUP(F2,year8progress,17,FALSE),IF(AND(L2=8,L1="Spr 1"),VLOOKUP(F2,year8progress,27,FALSE),IF(AND(L2=8,L1="Spr 2"),VLOOKUP(F2,year8progress,37,FALSE),IF(AND(L2=8,L1="Sum 1"),VLOOKUP(F2,year8progress,47,FALSE),IF(AND(L2=8,L1="Sum 2"),VLOOKUP(F2,year8progress,57,FALSE),IF(AND(L2=9,L1="Aut 1"),VLOOKUP(F2,year9progress,7,FALSE),IF(AND(L2=9,L1="Aut 2"),VLOOKUP(F2,year9progress,17,FALSE),IF(AND(L2=9,L1="Spr 1"),VLOOKUP(F2,year9progress,27,FALSE),IF(AND(L2=9,L1="Spr 2"),VLOOKUP(F2,year9progress,37,FALSE),IF(AND(L2=9,L1="Sum 1"),VLOOKUP(F2,year9progress,47,FALSE),IF(AND(L2=9,L1="Sum 2"),VLOOKUP(F2,year9progress,57,FALSE),IF(AND(L2=10,L1="Aut 1"),VLOOKUP(F2,year10progress,7,FALSE),IF(AND(L2=10,L1="Aut 2"),VLOOKUP(F2,year10progress,17,FALSE),IF(AND(L2=10,L1="Spr 1"),VLOOKUP(F2,year10progress,27,FALSE),IF(AND(L2=10,L1="Spr 2"),VLOOKUP(F2,year10progress,37,FALSE),IF(AND(L2=10,L1="Sum 1"),VLOOKUP(F2,year10progress,47,FALSE),IF(AND(L2=10,L1="Sum 2"),VLOOKUP(F2,year10progress,57,FALSE),IF(AND(L2=11,L1="Aut 1"),VLOOKUP(F2,year11progress,7,FALSE),IF(AND(L2=11,L1="Aut 2"),VLOOKUP(F2,year11progress,17,FALSE),IF(AND(L2=11,L1="Spr 1"),VLOOKUP(F2,year11progress,27,FALSE),IF(AND(L2=11,L1="Spr 2"),VLOOKUP(F2,year11progress,37,FALSE),IF(AND(L2=11,L1="Sum 1"),VLOOKUP(F2,year11progress,47,FALSE),IF(AND(L2=11,L1="Sum 2"),VLOOKUP(F2,year11progress,57,FALSE)))))))))))))))))))))))))))))))

Thanks in advance.

Chris Mitchell

Christopher Mitchell,

First I am assuming you mean at least one of the Vlookup formula gets invoked and it returns a blank cell because that is what is located at the intersection.  In that situation, vlookup returns a zero.  

But you say:

> If there is no data to be returned, the formula will return nothing; leaving the destination cell blank.

So I guess I don't understand the situation.  If you mean it does return a zero because the vlookup does work and the value returned is an empty cell - then it would return a zero - then you can test for that like

=if(currentformula=0,"No Figure",currentformula)

But there is no single function you can add around your formula like IFERROR that will adjust what is returned.  If the cells actually have a space in them and that is what is returned, then you could replace the space in those cells with the string "No Figure" or

if the normal meaningful returned value is a number and the bad returned value is a space, then you could format the cell with a custom number format to display "No Figure" unless a number has been returned.  

So I believe we are in the area of workarounds at this point and I would probably need to see the workbook to suggest anything.

Tom Ogilvy

About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.