Ignore cell IF error

gtd526

Well-known Member
Joined
Jul 30, 2013
Messages
696
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I have a nested IF formula, if a cell contains an error, how can I ignore only that cell (and continue calculating the remaining cells)?
Column H:H contains the nestedIF statement. The error is AJ.
Thank you.

NBA.xlsm
ABCGHIADAEAFAGAHAIAJAKALAM
25/3/21MEALL W%Bet W%AvgInd %ATSvs AllAway vs
3TeamsATS'W-LIndicatorPickATSFavsInj'sPtsG:GRangeATSHomeStrk
4ORL2    39% 8358 25%39.0%50.0%W1
5DET-2R:T-M  DET52%100%755872.2%100%52.0%57.0%L2
6IND4U:V-Y   47%100%658349.8%0%47.0%55.0%W1
7WAS-4R:T-M###########WAS65%100%224372.2%#VALUE!65.0%52.0%L1
8GS2   GS53%40%5397 75%53.0%38.0%W1
9NO-2    55%33%4430 17%55.0%46.0%W2
Favs
Cell Formulas
RangeFormula
A2A2=TODAY()
G4,G8,G6G4=IF(AND($R4>$R5,$S4>$S5,$T4>$T5,$U4>$U5,$V4>$V5,$W4>$W5,$X4>$X5,$Y4>$Y5,$Z4>$Z5,$M4>$M5),"R:Z-M",IF(AND($R4>$R5,$S4>$S5,$T4>$T5,$U4>$U5,$V4>$V5,$W4>$W5,$X4>$X5,$Y4>$Y5,$Z4>$Z5),"R:Z",IF(AND($M4>$M5,$Q4>$Q5,$R4>$R5,$S4>$S5,$T4>$T5,$U4>$U5,$V4>$V5,$X4>$X5,$Y4>$Y5,$Z4>$Z5,$W4>$W5),"M-Q-R:V-X:Z-W",IF(AND($M4>$M5,$Q4>$Q5,$R4>$R5,$S4>$S5,$T4>$T5,$U4>$U5,$V4>$V5,$Y4>$Y5,$Z4>$Z5,$W4>$W5),"M-Q-R:V-Y:Z-W",IF(AND($M4>$M5,$R4>$R5,$S4>$S5,$T4>$T5,$U4>$U5,$V4>$V5,$X4>$X5,$Y4>$Y5,$Z4>$Z5,$W4>$W5),"M-R:V-X:Z-W",IF(AND($M4>$M5,$R4>$R5,$S4>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$S5,$T4>$T5,$Y4>$Y5),"R:T-Y",IF(AND($R4>$R5,$S4>$S5,$T4>$T5),"R:T",IF(AND($U4>$U5,$V4>$V5,$W4>$W5,$X4>$X5,$Y4>$Y5,$Z4>$Z5),"U:Z",IF(AND($U4>$U5,$V4>$V5,$M4>$M5,$S4>$S5,$W4>$W5,$Y4>$Y5),"U:V-M-S-W-Y",IF(AND($U4>$U5,$V4>$V5,$S4>$S5,$W4>$W5,$Y4>$Y5),"U:V-S-W-Y",IF(AND($U4>$U5,$V4>$V5,$W4>$W5,$Y4>$Y5),"U:V-W-Y",IF(AND($U4>$U5,$V4>$V5,$Y4>$Y5),"U:V-Y",IF(AND($U4>$U5,$V4>$V5,$W4>$W5),"U:V-W",""))))))))))))))))))))))))))))))))))))))))))
H8:H9,H4:H6H4=IFERROR(IF(AND($A4=$AD4,$AI4>=0.6,$AJ4>=0.6,$AK4>=0.525,$AL4>=0.525,$AH4<$AF$1,$G4<>""),$A4,""),"")
I4:I9I4=IF($H4<>"",$B4,"")
AD4AD4=IFS($AC4>$AC5,$A4,$AC4<$AC5,"",AND($AC4=0,$AC5=0),"",$AC4=$AC5,"Tie")
AE4:AE9AE4=IFERROR(VLOOKUP($A4,$BU$6:$BX$35,4,0),"")
AF4:AF9AF4=IFERROR(VLOOKUP(A4,'C:\Users\Greg\Documents\Sports-Wagering\[Wagers.xlsm]NBA'!$N$9:$Q$42,4,0),"")
AG4:AG9AG4=IFERROR(INDEX(Injuries!$2:$2,MATCH($A$4:$A$33,Injuries!$1:$1,0)),"")
AH4:AH9AH4=IFERROR(INDEX(Injuries!$B$16:$EQ$16,MATCH($A4,Injuries!$B$1:$EQ$1,0)+4),"")
AI4:AI9AI4=IF($G4="","",SUMIFS($AR$7:$BL$142,$AN$5:$BH$140,$G4))
AJ4:AJ9AJ4=IF($B4>=1,ROUND(VLOOKUP($A4,$DU$6:$DY$35,5,0),2),IF(AND($B4<=-1,$B4>=-4.5),ROUND(VLOOKUP($A4,$DH$6:$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($U5>$U4,$V5>$V4,$M5>$M4,$S5>$S4,$W5>$W4,$Y5>$Y4),"U:V-M-S-W-Y",IF(AND($U5>$U4,$V5>$V4,$S5>$S4,$W5>$W4,$Y5>$Y4),"U:V-S-W-Y",IF(AND($U5>$U4,$V5>$V4,$W5>$W4,$Y5>$Y4),"U:V-W-Y",IF(AND($U5>$U4,$V5>$V4,$Y5>$Y4),"U:V-Y",IF(AND($U5>$U4,$V5>$V4,$W5>$W4),"U:V-W",""))))))))))))))))))))))))))))))))))))))))))
AD5AD5=IFS($AC5>$AC4,$A5,$AC5<$AC4,"",AND($AC5=0,$AC4=0),"",$AC5=$AC4,"Tie")
AD6,AD8AD6=IFS($AC6>$AC7,$A6,OR($AC6<$AC7,AND($AC6=0,$AC7=0)),"",$AC6=$AC7,"Tie")
H7H7=IF(AND($A7=$AD7,$AI7>=0.6,$AJ7>=0.6,$AK7>=0.525,$AL7>=0.525,$AH7<$AF$1,$G7<>""),$A7,"")
AD7,AD9AD7=IFS($AC7>$AC6,$A7,OR($AC7<$AC6,AND($AC7=0,$AC6=0)),"",$AC7=$AC6,"Tie")
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
The solution is to correct the source of the error (the formula in AJ) so that it is no longer an error.

The workaround is to error trap the part of the formula that looks at AJ so that it returns TRUE when there is an error.
Excel Formula:
=IFERROR(IF(AND($A4=$AD4,$AI4>=0.6,IFERROR($AJ4>=0.6,TRUE),$AK4>=0.525,$AL4>=0.525,$AH4<$AF$1,$G4<>""),$A4,""),"")
 
Upvote 0
Solution
The solution is to correct the source of the error (the formula in AJ) so that it is no longer an error.

The workaround is to error trap the part of the formula that looks at AJ so that it returns TRUE when there is an error.
Excel Formula:
=IFERROR(IF(AND($A4=$AD4,$AI4>=0.6,IFERROR($AJ4>=0.6,TRUE),$AK4>=0.525,$AL4>=0.525,$AH4<$AF$1,$G4<>""),$A4,""),"")
I've applied the IFERROR to the remaining ranges in the nestedif statement.
Thank you.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,126
Members
453,021
Latest member
Justyna P

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