IFERROR Formula help

bwlytkr

Board Regular
Joined
Jun 8, 2012
Messages
71
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
Joined
Dec 14, 2016
Messages
2,605
Office Version
365, 2016
Platform
Windows
Your last iferror does not have a value-if-error that is the value to return if there is an error
 

bwlytkr

Board Regular
Joined
Jun 8, 2012
Messages
71
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
Joined
Nov 7, 2006
Messages
8,328
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
Joined
Dec 14, 2016
Messages
2,605
Office Version
365, 2016
Platform
Windows
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))))
 

Forum statistics

Threads
1,084,751
Messages
5,379,631
Members
401,616
Latest member
YoSquidly

Some videos you may like

This Week's Hot Topics

  • VBA code giving errors and stopping Excel
    Hello Experts, I have this code being used to loop through files in a file path, and copy specific data to another sheet. It is giving me several...
  • Disable MsgBox message
    Morning, I have a userform where if i leave a ComboBox empty i see a MsgBox warning me that i must enter an invoice number. It is this MsgBox i...
  • Macro Recorder into VBA, Copy Paste Data Filled Cells
    Hi Everyone, I have a macro recorder file that takes a selection of data, copies, then pastes into a new sheet on ("A2:B2") The issue is my...
  • Number format changes while pasting into a cell
    Hi, I am trying to paste a number 180204524303 from an email to an excel cell, however, whenever i try to do so , the the paste value appears as...
  • Collating data
    Hello all. Could someone please help. I am trying to pull all column data from multiple sheets (24 I total so far) into 1 master sheet without...
  • Sum Multiple Columns Based on Multiple Criteria
    I am trying to consolidate data by summing columns G through M based on material, plant, vendor, and fiscal year being identical. The period does...
Top