Using Multiple IF Statements

ddhawks

New Member
Joined
Jul 6, 2016
Messages
20
Hi Everyone!

I'm working on a spreadsheet where everyone's work hours are tied to the project he or she is working on. For example, I have the name of the person in Column D, and Column R is the hours billed to the job. The hours billed to the job comes from a list at the bottom of the spreadsheet which is linked to another spreadsheet and is updated monthly. This data is found in Column B, Rows 40-59, with each row the number of hours each person worked.

Here is the formula I'm using: =IF(D4="Sean Mahoney",B44,IF(D4="Brad Stabenow",B45,IF(D4="Nicole Anderson",B41,IF(D4="Matt Huderski",B43,IF(D4="Shea Groom",B42,IF(D4="James Sherry",B52))))))

The very first row under PM Hours Billed to Jobs is correct. None of the others are. Is there a better formula to use? I copied and pasted my spreadsheet below because I couldn't figure out to insert a link. If anyone can help me out, I'd greatly appreciate it.

Thank you!
Darleen


[TABLE="width: 760"]
<tbody>[TR]
[TD]Job #[/TD]
[TD]Closed[/TD]
[TD]Job Name[/TD]
[TD]Project Manager[/TD]
[TD]Superintendent[/TD]
[TD]PM Hours Billed To Jobs[/TD]
[TD][/TD]
[TD]Supt Hours Billed To Jobs[/TD]
[/TR]
[TR]
[TD]2016-474[/TD]
[TD][/TD]
[TD]RMR US Treasury TI[/TD]
[TD]Sean Mahoney[/TD]
[TD]James Martin[/TD]
[TD="align: right"]5.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]10.00[/TD]
[/TR]
[TR]
[TD]2016-495[/TD]
[TD][/TD]
[TD]CRMC Dialysis Addition[/TD]
[TD]Brad Stabenow[/TD]
[TD]Dan Ozborn[/TD]
[TD="align: right"]7.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]12.00[/TD]
[/TR]
[TR]
[TD]2016-496[/TD]
[TD][/TD]
[TD]Swope OBGYN & Pediatric[/TD]
[TD]Nicole Anderson[/TD]
[TD]Troy McKitrick[/TD]
[TD="align: right"]4.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11.00[/TD]
[/TR]
[TR]
[TD]2017-497[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sean Mahoney[/TD]
[TD]Derrick Shanks[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]17.00[/TD]
[/TR]
[TR]
[TD]2017-509[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD]James Sherry[/TD]
[TD="align: right"]8.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13.00[/TD]
[/TR]
[TR]
[TD]2017-511[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD]Troy McKitrick[/TD]
[TD="align: right"]9.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11.00[/TD]
[/TR]
[TR]
[TD]2017-513[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shea Groom[/TD]
[TD]John Alexander[/TD]
[TD="align: right"]9.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]8.00[/TD]
[/TR]
[TR]
[TD]2017-518[/TD]
[TD][/TD]
[TD][/TD]
[TD]Nicole Anderson[/TD]
[TD]James Sherry[/TD]
[TD="align: right"]9.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13.00[/TD]
[/TR]
[TR]
[TD]2017-520[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sean Mahoney[/TD]
[TD]Jake Lawson[/TD]
[TD="align: right"]13.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]15.00[/TD]
[/TR]
[TR]
[TD]2017-523[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sean Mahoney[/TD]
[TD]James Martin[/TD]
[TD="align: right"]14.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]10.00[/TD]
[/TR]
[TR]
[TD]2017-527[/TD]
[TD][/TD]
[TD][/TD]
[TD]Nicole Anderson[/TD]
[TD]Mitch Welty[/TD]
[TD="align: right"]12.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]14.00[/TD]
[/TR]
[TR]
[TD]2017-529[/TD]
[TD][/TD]
[TD][/TD]
[TD]Brad Stabenow[/TD]
[TD]Gus Purdum[/TD]
[TD="align: right"]17.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]20.00[/TD]
[/TR]
[TR]
[TD]2017-531[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD]Aaron Hankammer[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]7.00[/TD]
[/TR]
[TR]
[TD]2017-532[/TD]
[TD][/TD]
[TD][/TD]
[TD]James Sherry[/TD]
[TD]James Sherry[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13.00[/TD]
[/TR]
[TR]
[TD]2017-533[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shea Groom[/TD]
[TD]John Alexander[/TD]
[TD="align: right"]17.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]8.00[/TD]
[/TR]
[TR]
[TD]2017-534[/TD]
[TD][/TD]
[TD][/TD]
[TD]Nicole Anderson[/TD]
[TD][/TD]
[TD="align: right"]17.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-535[/TD]
[TD][/TD]
[TD][/TD]
[TD]Sean Mahoney[/TD]
[TD]James Martin[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]10.00[/TD]
[/TR]
[TR]
[TD]2017-536[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD][/TD]
[TD="align: right"]0.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-537[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shea Groom[/TD]
[TD][/TD]
[TD="align: right"]0.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-538[/TD]
[TD][/TD]
[TD][/TD]
[TD]Brad Stabenow[/TD]
[TD][/TD]
[TD="align: right"]0.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-539[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD][/TD]
[TD="align: right"]0.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2017-540[/TD]
[TD][/TD]
[TD][/TD]
[TD]James Sherry[/TD]
[TD]James Sherry[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13.00[/TD]
[/TR]
[TR]
[TD]2017-541[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shea Groom[/TD]
[TD]Aaron Hankammer[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]7.00[/TD]
[/TR]
[TR]
[TD]2017-542[/TD]
[TD][/TD]
[TD][/TD]
[TD]Shea Groom[/TD]
[TD]Aaron Hankammer[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]7.00[/TD]
[/TR]
[TR]
[TD]2017-543[/TD]
[TD][/TD]
[TD][/TD]
[TD]Matt Huderski[/TD]
[TD]Troy McKitrick[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]11.00[/TD]
[/TR]
[TR]
[TD]2017-544[/TD]
[TD][/TD]
[TD][/TD]
[TD]Nicole Anderson[/TD]
[TD][/TD]
[TD="align: right"]0.00[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2018-545[/TD]
[TD][/TD]
[TD][/TD]
[TD]Nicole Anderson[/TD]
[TD]James Sherry[/TD]
[TD="align: right"]0.00[/TD]
[TD="align: right"][/TD]
[TD="align: right"]13.00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Hrs to Jobs[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Don[/TD]
[TD]1.00[/TD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/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]James S[/TD]
[TD]13.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mitch[/TD]
[TD]14.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jacob L[/TD]
[TD]15.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeffrey M[/TD]
[TD]16.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Derrick[/TD]
[TD]17.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jacob A[/TD]
[TD]18.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jeff P[/TD]
[TD]19.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Gus[/TD]
[TD]20.00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
You would use a Vlookup
=vlookup("NAME",TABLE,column number that you wish to return,0)
 
Upvote 0

Excel 2010
ABCDEFGH
3Job #ClosedJob NameProject ManagerSuperintendentPM Hours Billed To JobsSupt Hours Billed To Jobs
42016-474RMR US Treasury TISean MahoneyJames Martin510
4b
Cell Formulas
RangeFormula
F4=VLOOKUP(D4,A33:B52,2,0)
H4=VLOOKUP(E4,A33:B52,2,0)


N.B. The names must be consistent i.e. The list with the hours would have to include both first and last names.
 
Last edited:
Upvote 0
[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F4[/TH]
[TD="align: left"]=VLOOKUP(D4,A33:B52,2,0)[/TD]
[/TR]
[TR]
[TH="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]H4[/TH]
[TD="align: left"]=VLOOKUP(E4,A33:B52,2,0)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



N.B. The names must be consistent i.e. The list with the hours would have to include both first and last names.[/QUOTE]

This is EXACTLY what I needed. Thank you so much for your help!
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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