# Multiple If Arguments

#### Reinhars

##### New Member
Hi,

This is what I am trying to accomplish, however am limited to 7 arguments, but require 11.

=IF(O4=C4,B4,IF(O4=C5,B5,IF(O4=C6,B6,IF(O4=C7,B7,IF(O4=C8,B8,IF(O4=C9,B9,IF(O4=C10,B10,IF(O4=C11,B11,""))))))))

Any suggestions?

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

#### Fazza

##### MrExcel MVP
Hi, again. Can you use INDEX & MATCH formulas together? So, something like below, untested. HTH, Fazza
Code:
``=index(\$b\$4:\$b\$14,match(o4,\$c\$4:\$c\$14,0))``

#### Jonmo1

##### MrExcel MVP
=INDEX(B4:B11,MATCH(O4,C4:C11,0))

Hope that helps...

#### Reinhars

##### New Member
Hi, you folks are great thanks again.

Here are my results, the provided formula returns, #N/A.

This is what I am trying to accomplish.

If a cell has the date, 1 Jan 2009, I need it to reference a table to see if that date matches a date in column A, and then return the value (text) related to the date in column B. The table contains 11 dates and corresponding holiday names.

So, if C1(1 jan 09) = B1:B11(dates of holidays) then return the value in A1:A11 (names of holidays) otherwise leave blank

Hope this makes sense.

#### Fazza

##### MrExcel MVP
Maybe like earlier - with the range references to suit?
Code:
``=index(\$a\$1:\$a\$11,match(c1,\$b\$1:\$b\$11,0))``

#### Reinhars

##### New Member
Thanks again, that worked perfect. Thought I tried that before my last reply, guess not.

#### Reinhars

##### New Member
Hi, one glitch. If no value is available to be returned, "#N/A" is returned. Is there a way to leave the cell blank if no value is available to return. In other words if the date being referenced does not match the holiday date list, leave the cell blank.??

#### Fazza

##### MrExcel MVP
Yes. There are various approaches.

Simplest is maybe just add an extra (helper) column with the above formula. And then the final destination cell can have a formula like
Code:
``````=if(isna(helper cell),"",helper cell)
'or
=if(isna(helper cell),"some message",helper cell)``````

There are a number of different ways to achieve the result. If one doesn't suit, ask for another.

#### Reinhars

##### New Member
Can't stump you can I. Once again, worked like a charm.
Take care mate!

Replies
13
Views
942
Replies
8
Views
383
Replies
7
Views
673
Replies
12
Views
291
Replies
7
Views
1K

1,191,687
Messages
5,988,023
Members
440,125
Latest member
vincentchu2369

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