Calculate half-days

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I keep an attendance spreadsheet for my office. I can calculate vacation, personal days etc...using the count if function.
My problem is when someone takes half days. How can I get my formula to reflect (.5) instead of (1) in my half day cell
Any help would be appreciated
Is there any way I can attach an example and you would see clearly what I am trying to accomplish
 
Ann,

It's difficult to be specific without knowing how you structure your
spreadsheet, but you could upper and lower case L to signify full and half
day leave, and test like this

=IF(NOT(ISERROR(FIND("L",A1:A100))),1,IF(NOT(ISERROR(FIND("l",A1:A100))),0.5
,0))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Ann said:
I keep an attendance spreadsheet for my office. I can calculate vacation,
personal days etc...using the count if function.
My problem is when someone takes half days. How can I get my formula to
reflect (.5) instead of (1) in my half day cell.
 
Bob Phillips said:
=IF(NOT(ISERROR(FIND("L",A1:A100))),1,
IF(NOT(ISERROR(FIND("l",A1:A100))),0.5,0))
....

Quibble: ISNUMBER(FIND(...)) is preferable to NOT(ISERROR(FIND(...))).
 
Agreed!

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top