Embedded IF and IF Error Formula
Hi there,
I'm trying to use an IF and IF ERROR formula with an embedded index + match formula, so that if doesn't find the information on the one reference sheet it looks at the next sheet and then the next sheet.
=IF(IFERROR(INDEX({B16.P21 QF}, MATCH([Function/Task ID]@row, {B16.P21 ID}, 0))), IFERROR(INDEX({B16.P20 QF}, MATCH([Function/Task ID]@row, {B16.P20 ID}, 0))), IFERROR((INDEX({B16.P19 QF}, MATCH([Function/Task ID]@row, {B16.P19 ID}, 0))))
An incorrect argument message is being returned.
What am I doing wrong?
Best Answer
-
HI @Jack Parry
Looks like there was a couple of things there, you were closing out the IFERRORs before moving on to the next one instead of stacking them and there were errant close brackets at the end.
Without recreating the sheets etc. I cant test but think the below may work.
You don't require the initial IF function as the IFERROR is doing that for you
=IFERROR(INDEX({B16.P21 QF}, MATCH([Function/Task ID]@row, {B16.P21 ID}, 0)), IFERROR(INDEX({B16.P20 QF}, MATCH([Function/Task ID]@row, {B16.P20 ID}, 0)), IFERROR(INDEX({B16.P19 QF}, MATCH([Function/Task ID]@row, {B16.P19 ID}, 0)),"Error")))
Let me know how it goes
Thanks
Paul
Answers
-
HI @Jack Parry
Looks like there was a couple of things there, you were closing out the IFERRORs before moving on to the next one instead of stacking them and there were errant close brackets at the end.
Without recreating the sheets etc. I cant test but think the below may work.
You don't require the initial IF function as the IFERROR is doing that for you
=IFERROR(INDEX({B16.P21 QF}, MATCH([Function/Task ID]@row, {B16.P21 ID}, 0)), IFERROR(INDEX({B16.P20 QF}, MATCH([Function/Task ID]@row, {B16.P20 ID}, 0)), IFERROR(INDEX({B16.P19 QF}, MATCH([Function/Task ID]@row, {B16.P19 ID}, 0)),"Error")))
Let me know how it goes
Thanks
Paul
-
@Paul McGuinness Worked perfectly! Thank you :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!