Multiple If statements too many arguments

ItalianPlatinum

Well-known Member
Joined
Mar 23, 2017
Messages
880
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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,"","-"),"")
 
Upvote 0
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-
 
Upvote 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-

OK. Did you try the formula I gave for cell H7?
 
Upvote 0
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?
 
Upvote 0
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))
 
Upvote 0
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?
 
Upvote 0
Solution
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
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,217
Members
453,024
Latest member
Wingit77

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