Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 262
Default SUM & SUMIF formula problems

I have a portion of a spreadsheet with 13 columns and 119 rows of data (from
BE5 to BQ123 - with each row being designated as "HOV Freeway" "Freeway" or
"Arterial" in column C). I tried to perform a simple sum on this data IF the
row is a "HOV Freeway".

So the formula I used was: =(SUMIF(C5:C123,"HOV Freeway",BE5:BQ123))...
I didn't get any type of error, excel seemed to accept the formula and gave
me a value of 24889.6, but that value is just the Sum of BE5:BE123. When
doing a quick check, the real value should be 281261.0... not even close to
what excel calculated for me.

My question is, why didn't I get an error if it is only going to sum one
column, instead of the 13 columns I thought I was asking for in the formula?

Is there a way to sum all of those columns and rows, using SUMIF? Does the
range you specify for SUMIF correlate to the sum_range (ie, if the 'if' range
is only 1 column, the sum_range can only be returned for 1 column)? I really
need this to work for 13 columns.

Thanks a lot for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default SUM & SUMIF formula problems

With SUMIF, your criteria range and your sum range must be the same size.
What if you added a total column, say in column BR? This way all of your
data to sum would be in one column. So, in BR5, you'd enter the formula
=SUM(BE5:BQ5) then copy down through row 123.

Then your sumif formula would be:

=SUMIF(C5:C123,"HOV Freeway",BR5:BR123)

HTH,
Elkar


"Keith" wrote:

I have a portion of a spreadsheet with 13 columns and 119 rows of data (from
BE5 to BQ123 - with each row being designated as "HOV Freeway" "Freeway" or
"Arterial" in column C). I tried to perform a simple sum on this data IF the
row is a "HOV Freeway".

So the formula I used was: =(SUMIF(C5:C123,"HOV Freeway",BE5:BQ123))...
I didn't get any type of error, excel seemed to accept the formula and gave
me a value of 24889.6, but that value is just the Sum of BE5:BE123. When
doing a quick check, the real value should be 281261.0... not even close to
what excel calculated for me.

My question is, why didn't I get an error if it is only going to sum one
column, instead of the 13 columns I thought I was asking for in the formula?

Is there a way to sum all of those columns and rows, using SUMIF? Does the
range you specify for SUMIF correlate to the sum_range (ie, if the 'if' range
is only 1 column, the sum_range can only be returned for 1 column)? I really
need this to work for 13 columns.

Thanks a lot for the help.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default SUM & SUMIF formula problems

Does the range you specify for SUMIF correlate to
the sum_range (ie, if the 'if' range is only 1 column,
the sum_range can only be returned for 1 column)?


Yes, that's how it works.

Try it like this:

=SUMPRODUCT((C5:C123="HOV Freeway")*BE5:BQ123)

--
Biff
Microsoft Excel MVP


"Keith" wrote in message
...
I have a portion of a spreadsheet with 13 columns and 119 rows of data
(from
BE5 to BQ123 - with each row being designated as "HOV Freeway" "Freeway"
or
"Arterial" in column C). I tried to perform a simple sum on this data IF
the
row is a "HOV Freeway".

So the formula I used was: =(SUMIF(C5:C123,"HOV Freeway",BE5:BQ123))...
I didn't get any type of error, excel seemed to accept the formula and
gave
me a value of 24889.6, but that value is just the Sum of BE5:BE123. When
doing a quick check, the real value should be 281261.0... not even close
to
what excel calculated for me.

My question is, why didn't I get an error if it is only going to sum one
column, instead of the 13 columns I thought I was asking for in the
formula?

Is there a way to sum all of those columns and rows, using SUMIF? Does
the
range you specify for SUMIF correlate to the sum_range (ie, if the 'if'
range
is only 1 column, the sum_range can only be returned for 1 column)? I
really
need this to work for 13 columns.

Thanks a lot for the help.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 262
Default SUM & SUMIF formula problems

Thanks for the help,
I think i will add a total column, but the way I have it set up it would be
inconvienent, but that will work.

It is just odd that excel doesn't return an error.

Thanks again,
Keith

"Elkar" wrote:

With SUMIF, your criteria range and your sum range must be the same size.
What if you added a total column, say in column BR? This way all of your
data to sum would be in one column. So, in BR5, you'd enter the formula
=SUM(BE5:BQ5) then copy down through row 123.

Then your sumif formula would be:

=SUMIF(C5:C123,"HOV Freeway",BR5:BR123)

HTH,
Elkar


"Keith" wrote:

I have a portion of a spreadsheet with 13 columns and 119 rows of data (from
BE5 to BQ123 - with each row being designated as "HOV Freeway" "Freeway" or
"Arterial" in column C). I tried to perform a simple sum on this data IF the
row is a "HOV Freeway".

So the formula I used was: =(SUMIF(C5:C123,"HOV Freeway",BE5:BQ123))...
I didn't get any type of error, excel seemed to accept the formula and gave
me a value of 24889.6, but that value is just the Sum of BE5:BE123. When
doing a quick check, the real value should be 281261.0... not even close to
what excel calculated for me.

My question is, why didn't I get an error if it is only going to sum one
column, instead of the 13 columns I thought I was asking for in the formula?

Is there a way to sum all of those columns and rows, using SUMIF? Does the
range you specify for SUMIF correlate to the sum_range (ie, if the 'if' range
is only 1 column, the sum_range can only be returned for 1 column)? I really
need this to work for 13 columns.

Thanks a lot for the help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sumif problems Ricardo Excel Discussion (Misc queries) 2 January 6th 07 12:14 AM
SUMIF problems David Excel Worksheet Functions 3 October 11th 06 03:11 AM
sumif problems vezerid Excel Discussion (Misc queries) 3 March 30th 06 10:00 PM
Problems with SUMIF() Navision Excel Worksheet Functions 5 March 3rd 06 04:22 PM
Sumif Problems Anat Excel Discussion (Misc queries) 6 June 16th 05 06:05 AM


All times are GMT +1. The time now is 11:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"