adding up some cells

W

Wayne Thompson

I would like to know if someone could give me a formula that will add up some cells?

On a weekly time sheet if I put an "X" in a cell by each day for each x if would add $6.00 for parking. So at the end of a 5 day week it would show $30.00 in one cell and if there was only 4 "x"s it would show $24.00 in a total cell.

Mon, 8 hours, "x" /// Tues, 8 hours, "x" and so on....
The X's would be in cells- F8, J8, N8, R8, V8, Z8, AB8 total shows in AF8

Each x = $6.00

I hope this makes sense,
Thanks for your time
Wayne
 
I

isabelle

hi Wayne,

=SUMPRODUCT(--(F8="x")+(J8="x")+(N8="x")+(R8="x")+(V8="x")+(Z8="x")+(AB8="x"))*6


--
isabelle



Le 2012-03-31 21:56, Wayne Thompson a écrit :
I would like to know if someone could give me a formula that will add up some cells?

On a weekly time sheet if I put an "X" in a cell by each day for each x if would add $6.00 for parking.

So at the end of a 5 day week it would show $30.00 in one cell and if there was only 4 "x"s it would show $24.00 in a total cell.
 
D

Don Guillett

I would like to know if someone could give me a formula that will add up some cells?

On a weekly time sheet if I put an "X" in a cell by each day for each x if would add $6.00 for parking. So at the end of a 5 day week it would show $30.00 in one cell and if there was only 4 "x"s it would show $24.00 in a total cell.

Mon, 8 hours, "x" /// Tues, 8 hours, "x" and so on....
The X's would be in cells- F8, J8, N8, R8, V8, Z8, AB8 total shows in AF8

Each x = $6.00

I hope this makes sense,
Thanks for your time
Wayne

If no other cells on the row have an X then it Could be as simple as
=SUMPRODUCT((F8:ab8="x")*1)
or if every 4th cell then this will do it
=SUMPRODUCT((T(OFFSET(F8:N8,0,{0,4,8,12,16,20}))="x")+0)
 
I

isabelle

hi Don,

it is a very beautiful formula
thanks for that

--
isabelle



Le 2012-04-01 09:24, Don Guillett a écrit :
 
I

isabelle

i'm glad to see you got it working! thanks for letting me know.
as Don has shown us, for your example, the formula can be shortened
=SUMPRODUCT((T(OFFSET(F8,0,{0,4,8,12,16,20,22}))="x")*6)


--
isabelle



Le 2012-04-01 21:24, Wayne Thompson a écrit :
 

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