Calculate half-days

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
 
B

Bob Phillips

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.
 
H

Harlan Grove

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(...))).
 
B

Bob Phillips

Agreed!

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top