IFERROR Formula

Arts

Well-known Member
Joined
Sep 28, 2007
Messages
770
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi all

I have the following formula =IF(P44>5,"",1) which is looking up a formula in cell P44 of =WEEKDAY(O40,2). Now when i get a #VALUE error I have tried to use the formula =IF(ISERROR((P44>5,"",1)),"", 1) but i get a message box saying

"There's a problem with this formula
Not trying to type a formula?

I am just trying to wrap an IFERROR around my IF statement like I have done many times but dont know why this isn't working. Any help would as always would be highly appreciated

Arts
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Re: IFERROR Formula help

Maybe
=IFERROR(IF(P44>5,"",1),"")
 
Upvote 0
Re: IFERROR Formula help

No maybe about it that hit the nail on the head!! Thank you very much!! Has it always been done this way? I was "taught" to always wrap the IF around the ISNA/ERROR part, so for example

=IF(ISNA(VLOOKUP(T39,V40:W40,2,FALSE)), "test", "search")
 
Upvote 0
Re: IFERROR Formula help

Depends on what you are trying to do.
The IFERROR will return the result of the formula unless it results in an error & then it will return something else, with the formula in post#2 that is ""
Your formula in post#3 will not return the result of the Vlookup, it will only return test or search.
 
Upvote 0
Re: IFERROR Formula help

Thanks for the reply, so with my VLOOKPUP if i did get an #NA returned I would do the following:

=IF(ISNA(VLOOKUP(T39,V40:W40,2,FALSE)), "test", VLOOKUP(T39,V40:W40,2,FALSE) this would return the value of the VLOOKUP if no #NA was present, so in theory this should work =IF(ISERROR(P29>5,"",1),"",1)

With the IFERROR I am unable to follow the same format as I have with the VLOOKUP...
 
Last edited:
Upvote 0
Re: IFERROR Formula help

With this
IF(ISNA(VLOOKUP(T39,V40:W40,2,FALSE)),"test", VLOOKUP(T39,V40:W40,2,FALSE)
You will calculate the vlookup twice if it returns a valid response, but with
=IFERROR(VLOOKUP(T39,V40:W40,2,FALSE),"test")
it will only be calculated once, so (IMO) using IFERROR is a better way of working.

To use ISERROR on the other formula it needs to be
=IF(ISERROR(P29>5),"",IF(P29>5,"",1))
 
Upvote 0
Re: IFERROR Formula help

Thank you so much for this breakdown!!! Explains it perfectly with both examples, exactly what I was after. As i had never used the IFERROR function before it threw me and was wondering how to do it using ISERROR.
 
Upvote 0
Re: IFERROR Formula help

You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top