Excel formula

SolveigBor

New Member
Joined
Aug 17, 2011
Messages
3
Hi!
I have a problem with a formula that gets too long to be accepted by excel.
I want to make a formula like this, only that I want to add more lines, which I'm not allowed to. Is there a way to make this shorter/easier?

=IF(ISNA(MATCH(O4,$Q$5:$Q$27,0)),O4,(IF(ISNA(MATCH(O5,$Q$5:$Q$27,0)),O5,(IF(ISNA(MATCH(O6,$Q$5:$Q$27,0)),O6,(IF(ISNA(MATCH(O7,$Q$5:$Q$27,0)),O7,(IF(ISNA(MATCH(O8,$Q$5:$Q$27,0)),O8,(IF(ISNA(MATCH(O9,$Q$5:$Q$27,0)),O9,(IF(ISNA(MATCH(O10,$Q$5:$Q$27,0)),O10,(IF(ISNA(MATCH(O11,$Q$5:$Q$27,0)),O11,(IF(ISNA(MATCH(O12,$Q$5:$Q$27,0)),O12,(IF(ISNA(MATCH(O13,$Q$5:$Q$27,0)),O13,(IF(ISNA(MATCH(O14,$Q$5:$Q$27,0)),O14,(IF(ISNA(MATCH(O15,$Q$5:$Q$27,0)),O15,(IF(ISNA(MATCH(O16,$Q$5:$Q$27,0)),O16,(IF(ISNA(MATCH(O17,$Q$5:$Q$27,0)),O17,(IF(ISNA(MATCH(O18,$Q$5:$Q$27,0)),O18,(IF(ISNA(MATCH(O19,$Q$5:$Q$27,0)),O19,(IF(ISNA(MATCH(O20,$Q$5:$Q$27,0)),O20,(IF(ISNA(MATCH(O21,$Q$5:$Q$27,0)),O21,(IF(ISNA(MATCH(O22,$Q$5:$Q$27,0)),O22,(IF(ISNA(MATCH(O23,$Q$5:$Q$27,0)),O23,(IF(ISNA(MATCH(O24,$Q$5:$Q$27,0)),O24,(IF(ISNA(MATCH(O25,$Q$5:$Q$27,0)),O25,(IF(ISNA(MATCH(O26,$Q$5:$Q$27,0)),O26,(IF(ISNA(MATCH(O27,$Q$5:$Q$27,0)),O27,(IF(ISNA(MATCH(O28,$Q$5:$Q$27,0)),O28,(IF(ISNA(MATCH(O29,$Q$5:$Q$27,0)),O29,(I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CH(O59,$Q$5:$Q$27,0)),O59,(IF(ISNA(MATCH(O61,$Q$5:$Q$27,0)),O61,(IF(ISNA(MATCH(O62,$Q$5:$Q$27,0)),O62,(IF(ISNA(MATCH(O63,$Q$5:$Q$27,0)),O63,(IF(ISNA(MATCH(O64,$Q$5:$Q$27,0)),O64,(IF(ISNA(MATCH(O65,$Q$5:$Q$27,0)),O65,(IF(ISNA(MATCH(O66,$Q$5:$Q$27,0)),O66,(IF(ISNA(MATCH(O67,$Q$5:$Q$27,0)),O67,O68)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
How about an array formula ( entered using Ctrl-Shift-Enter instead of Enter ) of:

=INDEX(O4:O75,SMALL(IF(ISNA(MATCH(O4:O75,$Q$5:$Q$27,0)),ROW(O4:O75)-3,9999),1))

... Excel will put curly brackets around the formula after pressing Ctrl-Shift-Enter, to indicate that it's an array formula.
 
Upvote 0
Thanks!
That works fine in cell 1, but I want to make another cell under, which originally was like this:
That doesn't work...

=IF(ISNA(MATCH(O5,$Q$5:$Q$28,0)),O5,(IF(ISNA(MATCH(O6,$Q$5:$Q$28,0)),O6,(IF(ISNA(MATCH(O7,$Q$5:$Q$28,0)),O7,(IF(ISNA(MATCH(O8,$Q$5:$Q$28,0)),O8,(IF(ISNA(MATCH(O9,$Q$5:$Q$28,0)),O9,(IF(ISNA(MATCH(O10,$Q$5:$Q$28,0)),O10,(IF(ISNA(MATCH(O11,$Q$5:$Q$28,0)),O11,(IF(ISNA(MATCH(O12,$Q$5:$Q$28,0)),O12,(IF(ISNA(MATCH(O13,$Q$5:$Q$28,0)),O13,(IF(ISNA(MATCH(O14,$Q$5:$Q$28,0)),O14,(IF(ISNA(MATCH(O15,$Q$5:$Q$28,0)),O15,(IF(ISNA(MATCH(O16,$Q$5:$Q$28,0)),O16,(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ATCH(O47,$Q$5:$Q$28,0)),O47,(IF(ISNA(MATCH(O48,$Q$5:$Q$28,0)),O48,(IF(ISNA(MATCH(O49,$Q$5:$Q$28,0)),O49,O50)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
 
Upvote 0
Explain what the next cell is supposed to do? It looks like it's doing exactly the same except ignoring cell O4.

Maybe you should do something like:
=INDEX(O4:O75,SMALL(IF(ISNA(MATCH(O4:O75,$Q$5:$Q$27,0)),ROW(O4:O75)-3,9999),2))
to get the 2nd missing item?
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,691
Members
452,938
Latest member
babeneker

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