Need formula help

G

Guest

I have a timesheet that has Sunday thru Saturday on it. I have a table made
where absent hours are entered. I want my absent code letter (say the letter
S for sick) to show up on the particular day of the week that it was used off
of the table of paid hours. How do I get excel to look at the Sunday thru
Saturday absent hours and determine which code to put.... V for vacation... S
for sick.... P for personal... ect. In the example below I would want the
letter S to show on Thursdays Absent hrs and the letter V to show on Mondays
Absent hours. The rest should show a blank cell. This table calculates to
a daily absent hrs collum followed by a absent code collum. I would like it
to calculate as followed.

Abent Hours Absent Code
Sun
Mon 8 V
Tues
Wed
Thur 8 S
Fri
Sat

Example of table:
It is set up like this off to the side of the time card:
Mon Tues Wed Thur Fri Sat Sun Total hrs
Sick 0 0 0 8 0 0 0 8
Vac 8 0 0 0 0 0 0 8
Pers 0 0 0 0 0 0 0 0
Float 0 0 0 0 0 0 0 0
Other 0 0 0 0 0 0 0 0
Holiday 0 0 0 0 0 0 0 0
 
B

Bob Phillips

In the cell next to Sun, say M1, add

=SUM(OFFSET(INDEX($B$1:$H$7,1,MATCH($L1,$B$1:$H$1,0)),,,7))

and copy down, and then in the next one add

=IF(M1<>0,LEFT(INDEX($A$2:$A$7,MATCH(M1,OFFSET($B$2,0,MATCH($L1,$B$1:$H$1,0)
-1,6,1))),1),"")

and copy down.

If the first is not in M1, change the second to suit.

Don't knowm what happens if you get 2 kinds though.
--

HTH

RP
(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