Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Sumif based within non blank cells

I am trying to create a formula that will sum based on criteria in one
column, but only a cariable region of ciguious cells. My data look like
this:

col1 col2 col3
1
2
3
4
Sum if for above 4 cells
1
2
3
sum if for above 3 cells


Subtotal will not work because it would include the entire column.
Basically I need any forumla that will tell the forumla to continue to sum up
until it reaches an empty cell.

I am drawing a blank on summing until the empty cell.



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif based within non blank cells

Let's assume this is your setup:

...........A..........B
1........1............
2........2............
3........3............
4........4............
5...................10
6........1.............
7........2.............
8........3............
9...................7

To get the sums in column B enter this formula in *B2* :

=IF(AND(A1<"",A2=""),A1,"")

Enter this formula in B3 and copy down to B9:

=IF(AND(A3="",A2<""),SUM(A$1:A3)-SUM(B$1:B2),"")

--
Biff
Microsoft Excel MVP


"petedacook" wrote in message
...
I am trying to create a formula that will sum based on criteria in one
column, but only a cariable region of ciguious cells. My data look like
this:

col1 col2 col3
1
2
3
4
Sum if for above 4 cells
1
2
3
sum if for above 3 cells


Subtotal will not work because it would include the entire column.
Basically I need any forumla that will tell the forumla to continue to sum
up
until it reaches an empty cell.

I am drawing a blank on summing until the empty cell.





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27
Default Sumif based within non blank cells

Thanks Biff, but i am beginning to think there is no way to do this without
adding a function inVBA.

The condition for the sum is in column A, the numbers to sumn are in column
B.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Sumif based within non blank cells

Maybe...
Select the column and press [F5] Special Blanks OK.
Click the Autosum toolbar button [Alt+=].

(Choose Edit Insert Shift Cells Right to shift across,
you can add extra cells to the selection by Ctrl+Clicking..)

"petedacook" wrote:

I am trying to create a formula that will sum based on criteria in one
column, but only a cariable region of ciguious cells. My data look like
this:

col1 col2 col3
1
2
3
4
Sum if for above 4 cells
1
2
3
sum if for above 3 cells


Subtotal will not work because it would include the entire column.
Basically I need any forumla that will tell the forumla to continue to sum up
until it reaches an empty cell.

I am drawing a blank on summing until the empty cell.



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 returns blank if all cells blank Heliocracy Excel Worksheet Functions 7 January 19th 09 08:59 PM
SUMIF except for blank cells Hagridore Excel Discussion (Misc queries) 3 November 26th 08 09:16 AM
SUMIF cells in Column B are blank Josh Hendrickson Excel Worksheet Functions 9 October 26th 08 06:45 AM
Sumif Cells Are Not Blank Powlaz Excel Worksheet Functions 12 March 15th 06 04:40 PM
Using SUMIF with non-blank cells Peter Aitken Excel Worksheet Functions 7 February 10th 05 02:11 PM


All times are GMT +1. The time now is 04:07 PM.

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

About Us

"It's about Microsoft Excel"