ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Complex Function? (https://www.excelbanter.com/excel-worksheet-functions/107636-complex-function.html)

Metolius Dad

Complex Function?
 
Dearest Wizards,

Typical Excel work schedule here. Employees names in Col A, Dates of a 4
week
period on Row 1.
What I want: Row 2 to have the number of WORKING employees on for that day.
Why this is becoming complicated: Below the schedule grid is another two
tables. One table has codes that go in the schedule grid that indicate
WORKING employees i.e. €œ1€ for lead worker, €œT€ for working the table, €œFL€
for working the floor etc. These codes would be in a column, say from B100
to B199. The other table has codes for NON-WORKING employees i.e. €œv€ for
vacation, €œm€ for meeting, €œFM€ for FMLA etc. These codes would be in a
column, say from B250 to B349.
Id like to avoid a countif+countif+countif situation because I anticipate
adding other codes as the years go by. Isnt there a formula I can use in
row 2 that will reference the €˜working codes column that will give me a
count of just the actual working employees for that day?

TIA for your assistance.
Sam Beardsley


Peo Sjoblom

Complex Function?
 
If you want to count the occurrences of 1, T and FL use

=SUM(COUNTIF(B100:B350,{1;"T";"FL"}))



--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(remove ^^ from email)


"Metolius Dad" wrote in message
...
Dearest Wizards,

Typical Excel work schedule here. Employee's names in Col A, Dates of a 4
week
period on Row 1.
What I want: Row 2 to have the number of WORKING employees on for that
day.
Why this is becoming complicated: Below the schedule grid is another two
tables. One table has codes that go in the schedule grid that indicate
WORKING employees i.e. "1" for lead worker, "T" for working the table,
"FL"
for working the floor etc. These codes would be in a column, say from
B100
to B199. The other table has codes for NON-WORKING employees i.e. "v" for
vacation, "m" for meeting, "FM" for FMLA etc. These codes would be in a
column, say from B250 to B349.
I'd like to avoid a countif+countif+countif situation because I anticipate
adding other codes as the years go by. Isn't there a formula I can use in
row 2 that will reference the 'working codes' column that will give me a
count of just the actual working employees for that day?

TIA for your assistance.
Sam Beardsley




Metolius Dad

Complex Function?
 
Peo,

Thank you for your reply. It's not quite what I wanted but I can make it
work. A problem I'm having with your formula though is that it counts
lowercase 't' and lowercase 'fl' even though the formula I entered is upper.
Any fix to make it count only what's in the quotes?

Thanks again,
Sam

"Peo Sjoblom" wrote:

If you want to count the occurrences of 1, T and FL use

=SUM(COUNTIF(B100:B350,{1;"T";"FL"}))



--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(remove ^^ from email)


"Metolius Dad" wrote in message
...
Dearest Wizards,

Typical Excel work schedule here. Employee's names in Col A, Dates of a 4
week
period on Row 1.
What I want: Row 2 to have the number of WORKING employees on for that
day.
Why this is becoming complicated: Below the schedule grid is another two
tables. One table has codes that go in the schedule grid that indicate
WORKING employees i.e. "1" for lead worker, "T" for working the table,
"FL"
for working the floor etc. These codes would be in a column, say from
B100
to B199. The other table has codes for NON-WORKING employees i.e. "v" for
vacation, "m" for meeting, "FM" for FMLA etc. These codes would be in a
column, say from B250 to B349.
I'd like to avoid a countif+countif+countif situation because I anticipate
adding other codes as the years go by. Isn't there a formula I can use in
row 2 that will reference the 'working codes' column that will give me a
count of just the actual working employees for that day?

TIA for your assistance.
Sam Beardsley






All times are GMT +1. The time now is 03:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com