Using multiple IF functions in single formula?

Stemond

New Member
Joined
Feb 1, 2014
Messages
7
I've had a search and found lots of threads on this but not one that answers my problem. This isn't how my spreadsheet is but the quickest way I can explain what I need:

A1-A4 - Are staff wages

C1-C6 - Are separate expenses

D1-D6 - Are each the same drop down list of staff names who need the adjacent expense adding to their wage

The formulas I need:

B1-B4 - Staff wages including any expenses they are listed next to

I can figure it out for one lot of expenses but when I get to the 2nd I start to struggle, could you help how I add the other IF functions in?

=IF(D1="Staff Name",+C1,"")+A1
 
Last edited:

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
It sounds like you need a VLOOKUP table rather than nested IF's. Is something like this what you are after?

Make a table like I did in H1:I6

Formula in B1:
=A1+VLOOKUP(D1,$H$1:$I$6,2,0)

Copy down.



Book1
ABCDEFGHI
1$ 100.00$ 102.00FredFred$ 2.00
2$ 200.00$ 210.00JoeBarney$ 4.00
3$ 300.00$ 308.00BettyWilma$ 6.00
4$ 400.00$ 406.00WilmaBetty$ 8.00
5Joe$ 10.00
6John$ 12.00
Sheet1
Cell Formulas
RangeFormula
B1=A1+VLOOKUP(D1,$H$1:$I$6,2,0)
B2=A2+VLOOKUP(D2,$H$1:$I$6,2,0)
B3=A3+VLOOKUP(D3,$H$1:$I$6,2,0)
B4=A4+VLOOKUP(D4,$H$1:$I$6,2,0)
 
Upvote 0
It sounds like you need a VLOOKUP table rather than nested IF's. Is something like this what you are after?

Make a table like I did in H1:I6

Formula in B1:
=A1+VLOOKUP(D1,$H$1:$I$6,2,0)

Copy down.


ABCDEFGHI
FredFred
JoeBarney
BettyWilma
WilmaBetty
Joe
John

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"] $ 100.00 [/TD]
[TD="align: right"] $ 102.00 [/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 2.00 [/TD]

[TD="align: center"]2[/TD]
[TD="align: right"] $ 200.00 [/TD]
[TD="align: right"] $ 210.00 [/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 4.00 [/TD]

[TD="align: center"]3[/TD]
[TD="align: right"] $ 300.00 [/TD]
[TD="align: right"] $ 308.00 [/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 6.00 [/TD]

[TD="align: center"]4[/TD]
[TD="align: right"] $ 400.00 [/TD]
[TD="align: right"] $ 406.00 [/TD]
[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 8.00 [/TD]

[TD="align: center"]5[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 10.00 [/TD]

[TD="align: center"]6[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"] $ 12.00 [/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=A1+VLOOKUP(D1,$H$1:$I$6,2,0)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B2[/TH]
[TD="align: left"]=A2+VLOOKUP(D2,$H$1:$I$6,2,0)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B3[/TH]
[TD="align: left"]=A3+VLOOKUP(D3,$H$1:$I$6,2,0)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B4[/TH]
[TD="align: left"]=A4+VLOOKUP(D4,$H$1:$I$6,2,0)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Cheers! thats pretty much sorted with a couple of tweeks!

Thanks again
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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