Excel Formula, text & number in cell

N

Need a Guru

I need your help, thank you for taking the time! :blush:)
I am making a spreadsheet to calculate time away from work. I would like to
be able to enter 8 PTO (8 hours paid time off) and another cell calculates
how many times that was entered in a column and adds that for me
automatically. My spreadsheet has the calendar, so all a person needs to do
is input the hours and the type of time taken (we also have holiday time; HT)
and it will automatically add it up for them. Please help! Thanks again!
 
B

barry houdini

I need your help, thank you for taking the time! :blush:)
I am making a spreadsheet to calculate time away from work. I would like to
be able to enter 8 PTO (8 hours paid time off) and another cell calculates
how many times that was entered in a column and adds that for me
automatically. My spreadsheet has the calendar, so all a person needs to do
is input the hours and the type of time taken (we also have holiday time;HT)
and it will automatically add it up for them. Please help! Thanks again!

It's probably easier if you enter hours in one cell and type of time
taken in another, then you can use a simple SUMIF to add up "PTO"
hours, e.g.

=SUMIF(A1:A10,"PTO",B1:B10)

where hours are in B1:B10 and type in A1:A10

.....but if you want it all in one cell then try a formula like this

=SUM(IF(RIGHT(A1:A10,LEN(C2))=C2,LEFT(A1:A10,FIND(" ",A1:A10)-1)+0))

This is an array formula which needs to be confirmed with CTRL+SHIFT
+ENTER so that curly braces appear around the formula in the formula
bar

C2 should contain the text, e.g. PTO
 

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