# Multiple If statements too many arguments

#### ItalianPlatinum

##### Active Member
Hello - I am at capacity on using if statements and not sure how to change my formula to include another one.

On the below really looking to just add one more criteria that if row D is 98 it needs to use CCC or CCC-. instead of DDD or DDD-. Right now i manually adjust it to correct. but want to find a way it auto does it. can someone help? i am fine using VBA too if easier

Book1
ABCDEFGHIJKLMNOPQ
1FAmountTypeAmountType
25000\$ 10,000.00Y\$ 5,000.00N
36000\$ 9,000.00Y\$ 5,000.00N
47000\$ 50,000.00Y\$ 5,000.00N
5
6DateFNCRFCTAmountTypeCommentFCTAmountTypeComment
73-Nov5000Intl2725%500027DDD2,500.00Y500027DDD1,250.00N
83-Nov5000Intl3150%500031DDD5,000.00Y500031DDD2,500.00N
93-Nov5000Intl9825%500098DDD2,500.00Y500098DDD1,250.00N
103-Nov6000Dom2720%600027DDD1,800.00Y600027DDD1,000.00N
113-Nov6000Dom3120%600031DDD1,800.00Y600031DDD1,000.00N
123-Nov6000Dom9840%600098DDD3,600.00Y600098DDD2,000.00N
133-Nov7000ID2710%700027DDD5,000.00Y700027DDD500.00N
143-Nov7000ID3180%700031DDD40,000.00Y700031DDD4,000.00N
153-Nov7000ID9810%700098DDD5,000.00Y700098DDD500.00N
Sheet3
Cell Formulas
RangeFormula
F7:F15F7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,1,FALSE))
G7:G15G7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",D7)
H7:H15H7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)>0,"DDD","DDD-"))
I7:I15I7=IF((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)))*E7,2))
J7:J15J7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,3,FALSE))
L7:L15L7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,1,FALSE))
M7:M15M7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",D7)
N7:N15N7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)>0,"DDD","DDD-"))
O7:O15O7=IF((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)))*E7,2))
P7:P15P7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,5,FALSE))

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### StephenCrump

##### MrExcel MVP
A bit of a guess, because the question isn't clear ...

Does this do what you want:

H7: =IFERROR(IF(D7=98,"CCC","DDD")&IF(VLOOKUP(B7,\$J\$2:\$L\$4,2,)>0,"","-"),"")

#### ItalianPlatinum

##### Active Member
A bit of a guess, because the question isn't clear ...

Does this do what you want:

H7: =IFERROR(IF(D7=98,"CCC","DDD")&IF(VLOOKUP(B7,\$J\$2:\$L\$4,2,)>0,"","-"),"")
Basically looking for
1. If no amount of the respective "F" in K2:K4 then D will be blank
1. If not blank and column "C" = 98 then if amount >0 do CCC, if not CCC-
2. If not 98 then if amount > 0 do DDD, if not DDD-

#### StephenCrump

##### MrExcel MVP
Basically looking for
1. If no amount of the respective "F" in K2:K4 then D will be blank
1. If not blank and column "C" = 98 then if amount >0 do CCC, if not CCC-
2. If not 98 then if amount > 0 do DDD, if not DDD-

OK. Did you try the formula I gave for cell H7?

#### ItalianPlatinum

##### Active Member

ADVERTISEMENT

OK. Did you try the formula I gave for cell H7?
Hi Stephen works except for If no amount of the respective "F" in K2:K4 then D will be blank

which i think is my fault i didn't have that in my mockup. so sorry

#### StephenCrump

##### MrExcel MVP
Hi Stephen works except for If no amount of the respective "F" in K2:K4 then D will be blank

Sorry, I am not clear what you mean. My formula for H7 will return blank if there is no match for B7 in J\$2:J\$4, or if B7 is blank.

If you want something different, can you please show an example?

#### ItalianPlatinum

##### Active Member

ADVERTISEMENT

Sorry, I am not clear what you mean. My formula for H7 will return blank if there is no match for B7 in J\$2:J\$4, or if B7 is blank.

If you want something different, can you please show an example?
apologies see below

Book1
ABCDEFGHIJKLMNOPQ
1FAmountTypeAmountType
25000Y\$ 5,000.00N
36000\$(10,000.00)Y\$ 5,000.00N
47000\$(10,000.00)Y\$ 5,000.00N
5
6DateFNCRFCTAmountTypeCommentFCTAmountTypeComment
73-Nov5000Intl2725%  DDD-   27DDD1,250.00
83-Nov5000Intl3150%  DDD-   31DDD2,500.00
93-Nov5000Intl9825%  CCC-   98DDD1,250.00
103-Nov6000Dom2720%600027DDD-2,000.00Y600027DDD1,000.00N
113-Nov6000Dom3120%600031DDD-2,000.00Y600031DDD1,000.00N
123-Nov6000Dom9840%600098CCC-4,000.00Y600098DDD2,000.00N
133-Nov7000ID2710%700027DDD-1,000.00Y700027DDD500.00N
143-Nov7000ID3180%700031DDD-8,000.00Y700031DDD4,000.00N
153-Nov7000ID9810%700098CCC-1,000.00Y700098DDD500.00N
Sheet3
Cell Formulas
RangeFormula
F7:F15F7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,1,FALSE))
G7:G15G7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",D7)
H7:H15H7=IFERROR(IF(D7=98,"CCC","DDD")&IF(VLOOKUP(B7,\$J\$2:\$L\$4,2,)>0,"","-"),"")
I7:I15I7=IF((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)))*E7,2))
J7:J15J7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,3,FALSE))
L7:L15L7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,1,FALSE))
M7:M15M7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",D7)
N7:N15N7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)>0,"DDD","DDD-"))
O7:O15O7=IF((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)))*E7,2))
P7:P15P7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,5,FALSE))

#### StephenCrump

##### MrExcel MVP
So because K2 is blank, you want blank in H7:H9?

Try H7: =IFERROR(IF(D7=98,"CCC","DDD")&IF(1/VLOOKUP(B7,\$J\$2:\$L\$4,2,)>0,"","-"),"")

I haven't looked at your formula in N7 yet. Is it doing what you want?

• ItalianPlatinum

#### ItalianPlatinum

##### Active Member
apologies see below

Book1
ABCDEFGHIJKLMNOPQ
1FAmountTypeAmountType
25000Y\$ 5,000.00N
36000\$(10,000.00)Y\$ 5,000.00N
47000\$(10,000.00)Y\$ 5,000.00N
5
6DateFNCRFCTAmountTypeCommentFCTAmountTypeComment
73-Nov5000Intl2725%  DDD-   27DDD1,250.00
83-Nov5000Intl3150%  DDD-   31DDD2,500.00
93-Nov5000Intl9825%  CCC-   98DDD1,250.00
103-Nov6000Dom2720%600027DDD-2,000.00Y600027DDD1,000.00N
113-Nov6000Dom3120%600031DDD-2,000.00Y600031DDD1,000.00N
123-Nov6000Dom9840%600098CCC-4,000.00Y600098DDD2,000.00N
133-Nov7000ID2710%700027DDD-1,000.00Y700027DDD500.00N
143-Nov7000ID3180%700031DDD-8,000.00Y700031DDD4,000.00N
153-Nov7000ID9810%700098CCC-1,000.00Y700098DDD500.00N
Sheet3
Cell Formulas
RangeFormula
F7:F15F7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,1,FALSE))
G7:G15G7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",D7)
H7:H15H7=IFERROR(IF(D7=98,"CCC","DDD")&IF(VLOOKUP(B7,\$J\$2:\$L\$4,2,)>0,"","-"),"")
I7:I15I7=IF((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)))*E7,2))
J7:J15J7=IF(VLOOKUP(B7,\$J\$1:\$L\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$L\$4,3,FALSE))
L7:L15L7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,1,FALSE))
M7:M15M7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",D7)
N7:N15N7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)="","",IF(VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)>0,"DDD","DDD-"))
O7:O15O7=IF((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE))="","",ROUND(ABS((VLOOKUP(B7,\$J\$1:\$N\$4,4,FALSE)))*E7,2))
P7:P15P7=IF(VLOOKUP(B7,\$J\$1:\$N\$4,2,FALSE)="","",VLOOKUP(B7,\$J\$1:\$N\$4,5,FALSE))
works great. thank you

Replies
4
Views
106
Replies
6
Views
73
Replies
1
Views
173
Replies
1
Views
50
Replies
1
Views
602

Threads
1,126,996
Messages
5,622,079
Members
415,875
Latest member
Tarali

### Share this page ### 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