Text Values

B

Brando

I'm tryng to build a spreadsheet to track employee vacations. How do I
sum 8 hours if a cell has a "V" entered and 4 hours if a cell has an
"X" entered?
 
C

CLR

Assuming you're using column A, and each row is either the number of hours
worked, or a V or a X, then use a helper column, B, and insert this in B1
and copy down.......change the A1's to A2's if you have a header in Row 1,
and put this in B2.

=IF(A1="V",8,IF(A1="X",4,A1))

Vaya con Dios,
Chuck, CABGx3
 
B

Brando

Thanks!

But what I have is a workbook with 12 sheets with the months and 1
sheet with statistics. I have 30 employees listed down Column A and
the days of the month across the row. The stat sheet sums the number
of days taken by an employee. I want to enter a V to show he/she is
taking a full day of vacation or an X to indicate a 1/2 day. This will
allow employees to see what days are available. The stat sheet allows
me to track how much time each employee has scheduled and taken.
 
C

CLR

If you want to add the numbers in a single row, including 8 for V and 4 for
X, then maybe this, adjusted for your row length might do it for you.......

=SUM(A1:Z1)+(COUNTIF(A1:Z1,"V")*8)+(COUNTIF(A1:Z1,"X")*4)

Vaya con Dios,
Chuck, CABGx3
 
C

CLR

You're more than welcome...........thanks for the feedback...........

Vaya con Dios,
Chuck, CABGx3
 

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