IFERROR Formula help

bwlytkr

Board Regular
I could use some help with this formula. First time using an IFERROR formula so not sure what I'm doing wrong. I keep getting a "too few arguments error". Any help would be appreciated.


=IFERROR(INDEX('[TICKET STEP LONG.xlsx]RAW_COMPLETIONS'!$B:$B,MATCH(G2,'[TICKET STEP LONG.xlsx]RAW_COMPLETIONS'!$A:$A,0)),IF(LEN(AM2)=8,AM2,IFERROR(INDEX('[WLS07.xlsx]WLS07'!$b:$b,MATCH(Am2,'[WLS07.xlsx]WLS07'!$a:$a,0)),IFERROR(INDEX('[wls07.xlsx]MAIN CITY'!$d:$d,MATCH(Ai2,'[wls07.xlsx]MAIN CITY'!$B:$B,0)))
 

Scott T

Well-known Member
Your last iferror does not have a value-if-error that is the value to return if there is an error
 

bwlytkr

Board Regular
Not sure I follow. Isn't the last iferror telling me if column d in main city matches ai2 to populate the corresponding cell in column b
 

Special-K99

Well-known Member
Format of IFERROR

IFERROR(formula, result if error)

Wheres your "result if error" in that formula?

All you have are IFERROR(INDEX(...MATCH(...)) , should be something here )s
 
Last edited:

Scott T

Well-known Member
IFERROR(value, value_if_error)
If value does NOT return an error then the result of value is displayed.
If value does return an error then value_if_error is returned.

for example
=IFERROR(INDEX(B1:B7,MATCH("bob",A1:A7,0)),"not found")
If index match returns an error because bob is not found then instead of returning a N/A error the formula returns "not found"


The text in red is the value augment.
The text in blue is what you are missing.
If the index match in red is an error then the zero is what is returned. You should change that to what you want to return if VALUE is an error.

=IFERROR(INDEX('[TICKET STEP LONG.xlsx]RAW_COMPLETIONS'!$B:$B,MATCH(G2,'[TICKET STEP LONG.xlsx]RAW_COMPLETIONS'!$A:$A,0)),IF(LEN(AM2)=8,AM2,IFERROR(INDEX('[WLS07.xlsx]WLS07'!$b:$b,MATCH(Am2,'[WLS07.xlsx]WLS07'!$a:$a,0)),IFERROR(INDEX('[wls07.xlsx]MAIN CITY'!$d:$d,MATCH(Ai2,'[wls07.xlsx]MAIN CITY'!$B:$B,0)),0))))
 

Some videos you may like

This Week's Hot Topics

  • Importing multiple excel files into one spreadsheet
    Hi, I'm trying to import multiple excel files (with the same format into a single spreadsheet) so that each day's file is listed underneath the...
  • find many based on a certain criteria
    good evening, I hope someone can help me? I have a workbook sheet 2 contains lots of data.... I would like to be able to find anything on sheet...
  • How to copy multiple rows using If
    Hi all, I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need...
  • VBA If statement
    Dear All, I have two dates, where I'd like a message box to pop, if the dates are between this criteria. [CODE] sDate1 = #10/1/2019#...
  • Text Format
    I have a sheet for user to keyin the data. The format of the data can be 451 / 1903, 0012 / 9908 or 00287 / 0099. The number after the "/" is...
  • Syntax errors
    Good Morning, Trying to compile a workbook, I keep getting a few errors. Here are the first two: [code=rich]Syntax Error: Function...
Top