This should be easy!

lewislusby

New Member
Joined
Jul 11, 2011
Messages
9
I'm making a department timesheet. The standard working hours (1 day) for 4 employees is 32. I want to put initials of those people who have a day off in another cell. So basically, I want to take away 8 hours for each set of initials in the "holiday/day off" cell. I've made it work but it's messy so is there a quick way? Suggestions please.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Thanks but can i do it so it counts initials. eg, maybe i'll have "AB,CD" in the holiday cell, so here I'd want 32-8(AB)-8(CD)= 16.
 
Upvote 0
Basically you just want to ignore the text in the calculation:

=32-SUM(IF(ISNUMBER(FIND("(",A1:A7)),LEFT(A1:A7,FIND("(",A1:A7)-1)+0))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.

Excel Workbook
ABCDEF
18(AB)16
28(CD)
3
4
5
Sheet1
 
Upvote 0
It would be easier though, if you put the values in the parentheses in a different cell rather than the same one.
 
Upvote 0
Either "AB","AB,CD","AB,CD,EF" will be in the cell depending on how many people take holiday, no numerical values. So.....
 
Upvote 0
Thats great for 1 set of initials but i need to cover all combinations and

=32-((COUNTIF(C5,("AB"))*8)+(COUNTIF(C5,("CD"))*8)+(COUNTIF(C5,("EF"))*8)+(COUNTIF(C5,("GH"))*8))

doesn't seem to work. Apologies for my uselessness in advance.

Thanks
 
Upvote 0
My formula works no matter what the intials are. What's the problem?
 
Upvote 0

Forum statistics

Threads
1,224,513
Messages
6,179,214
Members
452,895
Latest member
BILLING GUY

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