Nested IfError

chaitanyapatel88

New Member
Joined
Jul 27, 2020
Messages
6
Office Version
  1. 365
Hi,

I have a requirement where I need to check if value of a cell ex: E90 is available in another sheet, if available, fetch that value, and if not available, check for value of F90 in the other sheet. I am using the below formula but unable to evaluate result. If none of the values are available, update "ABC" Can you please help?

=IFERROR(IF(LEN(TRIM($E90)))<>0,INDEX('PFIC Report'!G:G,MATCH($E90,'PFIC Report'!C:C,0)),
IFERROR(IF(LEN(TRIM($F90)))<>0,INDEX('PFIC Report'!G:G,MATCH($F90,'PFIC Report'!D:D,0)),
IFERROR(IF(LEN(TRIM($H90)))<>0,INDEX('PFIC Report'!G:G,MATCH($H90,'PFIC Report'!E:E,0)),
IFERROR(IF(LEN(TRIM($J90)))<>0,INDEX('PFIC Report'!G:G,MATCH($J90,'PFIC Report'!F:F,0)),"ABC"))))

This requirement seems to be fine with IF condition, but it gives #N/A as result.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
yep.. got it. Below works fine. Removed the unecessary LEN from the formula. Thank you so much etaf for your time. Appreciate it :)

=IFERROR(INDEX('PFIC Report'!G:G,MATCH(TRIM($E90),'PFIC Report'!C:C,0)),
IFERROR(INDEX('PFIC Report'!G:G,MATCH(TRIM($F90),'PFIC Report'!D:D,0)),
IFERROR(NDEX('PFIC Report'!G:G,MATCH(TRIM($H90),'PFIC Report'!E:E,0)),
IFERROR(INDEX('PFIC Report'!G:G,MATCH(TRIM($J90),'PFIC Report'!F:F,0)),"ABC"))))
 
Upvote 0

Forum statistics

Threads
1,225,380
Messages
6,184,628
Members
453,248
Latest member
gmazee

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