ISERROR Comment

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hello Friends,



I am using this formula: =IF(AND(J2<>"C1313000",J2<>"C1313001"),VLOOKUP(H:H,DEfinitions!A:B,2,0),"")

And what it says is; If you see the "C1313000" or "C1313001" don't do the Vlookup and return blank. but now I need to be able to also say in the same formula if you do the vlookup and don't find the criteria you are looking for retunr the comment "AddToDef" and I am not sure how to enter the formula?


Normally when I do a Vlookup and want a comment I would use something like this. =If(ISERROR(VLOOKUP(H:H,DEfinitions!A:B,2,0),"ADDTODEF",VLOOKUP(H:H,DEfinitions!A:B,2,0))) but I got all that "IF" / "AND" formula in there so it doens't work?


I feel like I am just writing it wrong? any help would be much appreciated. Thanks!!


Excel 2003
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
You can still replace the VLOOKUP with your ISERROR version but you have a misplaced parenthesis, try like this

=IF(AND(J2<>"C1313000",J2<>"C1313001"),IF(ISERROR(VLOOKUP(H2,DEfinitions!A:B,2,0)),"ADDTODEF",VLOOKUP(H2,DEfinitions!A:B,2,0)),"")
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,334
Members
452,907
Latest member
Roland Deschain

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