Sumif Horizontal

L

Lindsey

I understand how sumif work veritically, but what if I want to sumif by rows
instead of columns?

Row A1 - AB1 are different years, 2001, 2002, etc. In row B1 - BB1, there
are numbers. I would like a formula that sums up the different years.

I would transpose the data, but it needs to be in this format to work with
another software.

Thanks in advance for your help!
 
T

T. Valko

Row A1 - AB1 are different years, 2001, 2002, etc.
In row B1 - BB1

Hmmm...

Those ranges don't make sense.

Do you mean that in every other cell there is a year number and you want to
sum the values to the immediate right of the year number cell?

Something like this:

2002 | 10 | 2009 | 20 | 2010 | 5 | 2002 | 50 |

The sum for year 2002 would be 60, 10+50.

Is that what you have?
 
T

trip_to_tokyo

In EXCEL 2007 to sum by row:-

1. In cells A 1 to E 1 enter 1 2 3 4 5.

2. In cell F 1 enter:-

=SUM(A1:E1)

Total of 15 is returned in cell F 1.

If my comments have helped please hit Yes.
 
G

Gary''s Student

If the first two rows look like:

2001 2002 2007 2007 2009 2001 2005
1 5 5 2 8 10 9

then something like:
=SUMPRODUCT(--(A1:AB1=2007)*(A2:AB2))
correctly displays 7
 
T

trip_to_tokyo

In EXCEL 2007 enter:-

2001 2002 2003 2005 2005

- in cells A 1 to E 1.

In cell F 1 enter:-

=SUM(A1:E1)

Total of 10015 gets returned to cell F 1.

Please hit Yes if my comments have helped.

Thanks.
 

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