# Formula Help

#### Rockhopper3

##### Board Regular
Hey everybody. Once again I need help with a crazy formula. Here is the formula I "want" to use, but when I press enter or ctrl,shift,enter it says there is an error. Any thoughts?

Code:
``=IF(B4=0,"",IF(L4="DNS1","DNS",IF(L4="DNS2","DNS",IF(L4="DNF1","DNF",IF(L4="DNF2","DNF",MATCH(TRUE,SMALL(IF(\$A\$4:\$A\$54=A4,\$L\$4:\$L\$54),ROW(INDIRECT("1:"&ROWS(\$A\$4:\$A\$54))))=L4,0))))))``

I use this formula to assign a ranking to a time sheet for a race. There are 2 starts and 2 finshes per race. Someone can start on the first leg, but not on the second. If they don't start the race, I put in DNS1. If they start 1st leg, I put in start time and end time of 1st leg. If they then do not start 2nd leg, I enter DNS2. The same is true if they do not finish, only I use DNF instead of DNS. Please help. Thanks.

### Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

#### Domenic

##### MrExcel MVP
Try...

=IF(B4=0,"",IF(OR(L4={"DNS1","DNS2"}),"DNS",IF(OR(L4={"DNF1","DNF2"}),"DNF",MATCH(L4,SMALL(IF(\$A\$4:\$A\$54=A4,\$L\$4:\$L\$54),ROW(INDIRECT("1:"&ROWS(\$A\$4:\$A\$54)))),0))))

...confirmed with CONTROL+SHIFT+ENTER.

Hope this helps!

Replies
4
Views
117
Replies
1
Views
414
Replies
0
Views
84
Replies
99
Views
1K
Replies
1
Views
113

### Forum statistics

1,136,878
Messages
5,678,324
Members
419,756
Latest member
vincent86kapelski

### 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.

### Which adblocker are you using?

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

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