IF statement question

  • Thread starter Thread starter Tedd
  • Start date Start date
T

Tedd

I have a spreadsheet that looks kind of like this:

.10 -4.0 7.1 Total
emp 1 x x
emp 2 x x

What I am trying to do is let a user enter an 'x' in
whatever column they want. Then in the Total column it
will add up the column heading numbers for all the columns
they have an 'x' in.

So with 'emp 1' they entered an 'x' in column '.10'
and '7.1'. So my Total would be '7.2'.

I have tried using an IF statement but I don't think
that's right. Do I need to use somekind of script to do
this?

Any ideas would be great! Thanks.
 
-----Original Message-----
I have a spreadsheet that looks kind of like this:

.10 -4.0 7.1 Total
emp 1 x x
emp 2 x x

What I am trying to do is let a user enter an 'x' in
whatever column they want. Then in the Total column it
will add up the column heading numbers for all the columns
they have an 'x' in.

So with 'emp 1' they entered an 'x' in column '.10'
and '7.1'. So my Total would be '7.2'.

I have tried using an IF statement but I don't think
that's right. Do I need to use somekind of script to do
this?

Any ideas would be great! Thanks.
.
Assuming your worksheet begins with the employees in
column "A", add this SUMPRODUCT formula to your total
column and copy it down:

=SUMPRODUCT((B2:D2="x")*($B$1:$D$1))
 

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

Back
Top