Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
hbpvs
 
Posts: n/a
Default auto sum in formula

I want to add an auto sum in a formula that adjusts the sum-range every time
the name in the left column changes. For example cells A1-A10 shows product
A, in cell A11 Total, than cells A12-A16 product B. Column B shows the sold
products but the row range for those subtotals differs frequently. So I'm
looking for something like a formula in cell C10 If(a10="Total",
autosum(b1:b9),b10), this autosum-range automatically to be adjusted. I know
how to do this in VB but can I also put this in a formula.
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
in C2 enter
=IF(A2="Total",SUMIF($A:$A,A1,$B:$B),"")
and copy down

"hbpvs" wrote:

I want to add an auto sum in a formula that adjusts the sum-range every time
the name in the left column changes. For example cells A1-A10 shows product
A, in cell A11 Total, than cells A12-A16 product B. Column B shows the sold
products but the row range for those subtotals differs frequently. So I'm
looking for something like a formula in cell C10 If(a10="Total",
autosum(b1:b9),b10), this autosum-range automatically to be adjusted. I know
how to do this in VB but can I also put this in a formula.

  #3   Report Post  
hbpvs
 
Posts: n/a
Default

Thanks, but I guess I did not explain my question clear enough.
This formula adds up the whole collumn B or 0, I only want to sum all
figures above the cell next to where A50="Total"
or am I doing something wrong, this is my formula
=IF(A50="Total",SUMIF($A:$A,A49,$B:$B),"") results in 0
=IF(A50="Total",SUMIF($A:$A,B49,$B:$B),"") results in 2068, while the result
should be 36



"Frank Kabel" wrote:

Hi
in C2 enter
=IF(A2="Total",SUMIF($A:$A,A1,$B:$B),"")
and copy down

"hbpvs" wrote:

I want to add an auto sum in a formula that adjusts the sum-range every time
the name in the left column changes. For example cells A1-A10 shows product
A, in cell A11 Total, than cells A12-A16 product B. Column B shows the sold
products but the row range for those subtotals differs frequently. So I'm
looking for something like a formula in cell C10 If(a10="Total",
autosum(b1:b9),b10), this autosum-range automatically to be adjusted. I know
how to do this in VB but can I also put this in a formula.

  #4   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
but if column A contains the (unique) product name this should do. Maybe
post some example rows of your data

--
Regards
Frank Kabel
Frankfurt, Germany

hbpvs wrote:
Thanks, but I guess I did not explain my question clear enough.
This formula adds up the whole collumn B or 0, I only want to sum all
figures above the cell next to where A50="Total"
or am I doing something wrong, this is my formula
=IF(A50="Total",SUMIF($A:$A,A49,$B:$B),"") results in 0
=IF(A50="Total",SUMIF($A:$A,B49,$B:$B),"") results in 2068, while the
result should be 36



"Frank Kabel" wrote:

Hi
in C2 enter
=IF(A2="Total",SUMIF($A:$A,A1,$B:$B),"")
and copy down

"hbpvs" wrote:

I want to add an auto sum in a formula that adjusts the sum-range
every time the name in the left column changes. For example cells
A1-A10 shows product A, in cell A11 Total, than cells A12-A16
product B. Column B shows the sold products but the row range for
those subtotals differs frequently. So I'm looking for something
like a formula in cell C10 If(a10="Total", autosum(b1:b9),b10),
this autosum-range automatically to be adjusted. I know how to do
this in VB but can I also put this in a formula.



  #5   Report Post  
hbpvs
 
Posts: n/a
Default

This is my example data
Car Dec
car1001 1
car1002 1
car1003 1
car1004 1
car1005 0
car1006 1
car1007 1
car1008 1
car1009 1
Total 8 1

I now put in Cell C4:C12 the formula
=IF(A13="Total",SUMIF($A:$A,A12,$B:$B),"") the result is 1 while it should be
8.

Thanks allot for your support, I'm sorry I don't understand


"Frank Kabel" wrote:

Hi
but if column A contains the (unique) product name this should do. Maybe
post some example rows of your data

--
Regards
Frank Kabel
Frankfurt, Germany

hbpvs wrote:
Thanks, but I guess I did not explain my question clear enough.
This formula adds up the whole collumn B or 0, I only want to sum all
figures above the cell next to where A50="Total"
or am I doing something wrong, this is my formula
=IF(A50="Total",SUMIF($A:$A,A49,$B:$B),"") results in 0
=IF(A50="Total",SUMIF($A:$A,B49,$B:$B),"") results in 2068, while the
result should be 36



"Frank Kabel" wrote:

Hi
in C2 enter
=IF(A2="Total",SUMIF($A:$A,A1,$B:$B),"")
and copy down

"hbpvs" wrote:

I want to add an auto sum in a formula that adjusts the sum-range
every time the name in the left column changes. For example cells
A1-A10 shows product A, in cell A11 Total, than cells A12-A16
product B. Column B shows the sold products but the row range for
those subtotals differs frequently. So I'm looking for something
like a formula in cell C10 If(a10="Total", autosum(b1:b9),b10),
this autosum-range automatically to be adjusted. I know how to do
this in VB but can I also put this in a formula.






  #6   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
this should work. <Are you sure your values in column B are stored as real
numbers?

--
Regards
Frank Kabel
Frankfurt, Germany

hbpvs wrote:
This is my example data
Car Dec
car1001 1
car1002 1
car1003 1
car1004 1
car1005 0
car1006 1
car1007 1
car1008 1
car1009 1
Total 8 1

I now put in Cell C4:C12 the formula
=IF(A13="Total",SUMIF($A:$A,A12,$B:$B),"") the result is 1 while it
should be 8.

Thanks allot for your support, I'm sorry I don't understand


"Frank Kabel" wrote:

Hi
but if column A contains the (unique) product name this should do.
Maybe post some example rows of your data

--
Regards
Frank Kabel
Frankfurt, Germany

hbpvs wrote:
Thanks, but I guess I did not explain my question clear enough.
This formula adds up the whole collumn B or 0, I only want to sum
all figures above the cell next to where A50="Total"
or am I doing something wrong, this is my formula
=IF(A50="Total",SUMIF($A:$A,A49,$B:$B),"") results in 0
=IF(A50="Total",SUMIF($A:$A,B49,$B:$B),"") results in 2068, while
the result should be 36



"Frank Kabel" wrote:

Hi
in C2 enter
=IF(A2="Total",SUMIF($A:$A,A1,$B:$B),"")
and copy down

"hbpvs" wrote:

I want to add an auto sum in a formula that adjusts the sum-range
every time the name in the left column changes. For example cells
A1-A10 shows product A, in cell A11 Total, than cells A12-A16
product B. Column B shows the sold products but the row range for
those subtotals differs frequently. So I'm looking for something
like a formula in cell C10 If(a10="Total", autosum(b1:b9),b10),
this autosum-range automatically to be adjusted. I know how to do
this in VB but can I also put this in a formula.



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
Auto fill of formula ksr Excel Worksheet Functions 7 June 6th 06 05:46 PM
revert formula insertion to old method Don't be a pain in the ass Setting up and Configuration of Excel 0 January 24th 05 01:49 PM
How do I use Range Names listed in a VLookup table in a formula? Essbasedvlpr32 Excel Worksheet Functions 3 December 15th 04 10:11 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


All times are GMT +1. The time now is 10:32 PM.

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"