I have a spreadsheet that I am setting up to show holidays and sickness days.
The table looks like this:Name Week 1 Week 2
M T W T F M T W T F
EMPLOYEE F F H F F
F = Full day holiday
H = Half day holiday
This bit is easy because I used Countif to calculate the number of days.
However, I need to convert it to hours which is a little more complicated.
The hours worked are Monday - Thursday 8.5 Hours, Friday - 5 hours. Only
five fridays per year can be taken as holiday.
I need a formula that will count the number of F entries and multiply it by
8.5 except if it is a Friday which be multiplied by 5. How do I do this?
--
Chris
Enter this formula in G4:
=8.5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2lt;gt;quot;Fquot;))
5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2=quot;Fquot;))
A B C D E F G
1 Name Week 1
2 M T W T F
3
4 EMPLOYEE F F H F formula
Regards,
StefiAssuming the day code is in B2:IV2, and the F/H codes are in B3:M3 (then 4,
etc) the total for row 3 is]
=SUM(IF($B3:$IV3lt;gt;quot;quot;,IF($B3:$IV3=quot;Fquot;,IF($B$2:$IV$2 =quot;Fquot;,4,8),IF($B$2:$IV$2=quot;F
quot;,2.5,5))))
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;christinacquot; gt; wrote in message
...
gt; I have a spreadsheet that I am setting up to show holidays and sickness
days.
gt; The table looks like this:
gt;
gt;
gt; Name Week 1 Week 2
gt; M T W T F M T W T F
gt;
gt; EMPLOYEE F F H F F
gt;
gt; F = Full day holiday
gt; H = Half day holiday
gt;
gt; This bit is easy because I used Countif to calculate the number of days.
gt; However, I need to convert it to hours which is a little more complicated.
gt; The hours worked are Monday - Thursday 8.5 Hours, Friday - 5 hours. Only
gt; five fridays per year can be taken as holiday.
gt;
gt; I need a formula that will count the number of F entries and multiply it
by
gt; 8.5 except if it is a Friday which be multiplied by 5. How do I do this?
gt; --
gt; Chris
Thank you! That worked perfectly!
--
Chrisquot;Stefiquot; wrote:
gt; Enter this formula in G4:
gt; =8.5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2lt;gt;quot;Fquot;))
gt; 5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2=quot;Fquot;))
gt; A B C D E F G
gt; 1 Name Week 1
gt; 2 M T W T F
gt; 3
gt; 4 EMPLOYEE F F H F formula
gt;
gt; Regards,
gt; Stefi
gt;
Assuming your day headers (MTWTF) are in row #2, starting with col C
and your hours total in col B
B1: =SUMPRODUCT((C3:AZ3=quot;Fquot;)*(((C$2:AZ$2=quot;Fquot;)*5) (C$2: AZ$2lt;gt;quot;Fquot;)*8.5))
HTH
--
APquot;christinacquot; gt; a 嶰rit dans le message
de ...
gt; I have a spreadsheet that I am setting up to show holidays and sickness
days.
gt; The table looks like this:
gt;
gt;
gt; Name Week 1 Week 2
gt; M T W T F M T W T F
gt;
gt; EMPLOYEE F F H F F
gt;
gt; F = Full day holiday
gt; H = Half day holiday
gt;
gt; This bit is easy because I used Countif to calculate the number of days.
gt; However, I need to convert it to hours which is a little more complicated.
gt; The hours worked are Monday - Thursday 8.5 Hours, Friday - 5 hours. Only
gt; five fridays per year can be taken as holiday.
gt;
gt; I need a formula that will count the number of F entries and multiply it
by
gt; 8.5 except if it is a Friday which be multiplied by 5. How do I do this?
gt; --
gt; Chris
You are welcome, thanks for the feedback!
Stefi?hristinac??ezt ?rta:
gt; Thank you! That worked perfectly!
gt; --
gt; Chris
gt;
gt;
gt; quot;Stefiquot; wrote:
gt;
gt; gt; Enter this formula in G4:
gt; gt; =8.5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2lt;gt;quot;Fquot;))
gt; gt; 5*SUMPRODUCT(--(B4:F4=quot;Fquot;),--(B2:F2=quot;Fquot;))
gt; gt; A B C D E F G
gt; gt; 1 Name Week 1
gt; gt; 2 M T W T F
gt; gt; 3
gt; gt; 4 EMPLOYEE F F H F formula
gt; gt;
gt; gt; Regards,
gt; gt; Stefi
gt; gt;
- May 27 Tue 2008 20:43
Need help on counting text within certain criteria
close
全站熱搜
留言列表
發表留言
留言列表

