IF With 2 Criteria returning a Value or 0

sea_captain

New Member
Joined
Jan 10, 2017
Messages
20
I have a spreadsheet with thousands of rows with Projects and Hours and i'm trying to solve the "yellow cells"
I need to place the hours in column C "Non-Billable" (N-B) OR column D "Non-Working" (N-W) based on a Mapping Table I created by identifying each Project as either N-B or N-W

For example Project "ABC" is identified as "N-B" in the mapping table, I need the Hours to show up in column C and NOT D.

I've tried to create IF formulas but keep getting hung up.
Basically i want a formula in col. C and D that says, (in cell C2 and D2) IF "Project" (cell A2) matches the mapping table col. A:A AND the "Hour Type" (cell C$1 or D$1) = the mapping table (cells B8:B10), then $B2 or 0
1737121424646.png

Any Ideas or better ways to accomplish this?
Thanks for any help!
SC
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi, perhaps something like this.

Book1
ABCD
1ProjectHoursNon-BillableNon-Working
2ABC8.68.60
31237.207.2
4A1B2C35.45.40
5
6Mapping Tabe
7ProjectHours Type
8A1B2C3Non-Billable
9ABCNon-Billable
10123Non-Working
Sheet1
Cell Formulas
RangeFormula
C2:D4C2=IF(VLOOKUP($A2,$A$7:$B$10,2,0)=C$1,$B2,0)
 
Upvote 0
Assuming that each Project only appears once in the Project Mapping:
1737123165126.png


Put this formula in cell C2 and copy down and across to D4:
Excel Formula:
=COUNTIFS($A$8:$A$10,$A2,$B$8:$B$10,C$1)*$B2
 
Upvote 0
unfortunately the project "name" is used by multiple 'departments', so it appears more than once.
In your lower section?
If so, could there ever be a conflict, i.e. where "ABC" says "Non-Billable" for one record, and "Non-Working" for another?
If that could happen, how do you know which one to choose/use?
 
Upvote 0
your lower section?
If so, could there ever be a conflict, i.e. where "ABC" says "Non-Billable" for one record, and "Non-Working" for another?
If that could happen, how do you know which one to choose/use?
Sorry, i misread. the 'projects' are unique in the mapping table (correct)
In the 'source' tab, it's not unique.

I think the first solution solved my issue. but i will try yours as well
 
Upvote 0
Sorry, i misread. the 'projects' are unique in the mapping table (correct)
In the 'source' tab, it's not unique.

I think the first solution solved my issue. but i will try yours as well
Yes, there are often many different ways to solve the same problem.
As long as the "Projects" are unique in the Mapping table, it should work.
 
Upvote 0

Forum statistics

Threads
1,225,623
Messages
6,186,065
Members
453,336
Latest member
Excelnoob223

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