ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Text Values (https://www.excelbanter.com/excel-discussion-misc-queries/22394-text-values.html)

Brando

Text Values
 
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?


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


"Brando" wrote in message
oups.com...
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?




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.


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



"Brando" wrote in message
oups.com...
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.




Brando

That did it for me!

Thanks so much for the help.


CLR

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

Vaya con Dios,
Chuck, CABGx3


"Brando" wrote in message
ups.com...
That did it for me!

Thanks so much for the help.





All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com