#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default sum a specific range

I am working in Microsoft Excel 2003. I am trying to sum certain ranges in
multiple lines of data. An example of my spreadsheet is below. The way it
is now, the "END BALANCE" row is not including the amount in the CDU field
(row 1 and 8). I need to be able to sum rows 1-5 with results on row 6 and
then sum rows 8-14 with results on row 15, etc. Any ideas?

A B C
1 NAME CDU 3.42
2 INCOME 1.31
3 BOND 1.29
4 BALANCED 5.42
5 LARGE-CAP 3.05
6 END BALANCE 11.07
7 0
8 NAME CDU 5.42
9 INCOME 6.31
10 BOND 18.29
11 BALANCED 53.42
12 LARGE-CAP 35.05
13 MID-CAP 2.00
14 WORLD 5.00
15 END BALANCE 120.07

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 342
Default sum a specific range

I may have misunderstood your question but it should be as simple as entering
the following formulas:

Enter the formula =sum(C2:C5) in cell C6
Enter the formula =sum(C9:C14) in cell C15

Tom
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default sum a specific range

I wish it was just that easy. My spreadsheet is about 10,000 rows and I was
searching for one formula that I could use.

"TomPl" wrote:

I may have misunderstood your question but it should be as simple as entering
the following formulas:

Enter the formula =sum(C2:C5) in cell C6
Enter the formula =sum(C9:C14) in cell C15

Tom

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 342
Default sum a specific range

I guess you wanted to include the CDU row so change the formulas to:

Enter the formula =sum(C1:C5) in cell C6
Enter the formula =sum(C8:C14) in cell C15

Tom
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default sum a specific range

I have about 10,000 rows of data. Will I have to do that manually? I just
need to somehow name the range between the CDU# and the line before the END
BALANCE #.

"TomPl" wrote:

I guess you wanted to include the CDU row so change the formulas to:

Enter the formula =sum(C1:C5) in cell C6
Enter the formula =sum(C8:C14) in cell C15

Tom



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default sum a specific range

try this

Keep Row 1 blank

in D2 put this formula and drag it down =IF(A3=0,(SUM($C$2:C2)-SUM($D
$1:D1)),"")



On Nov 26, 10:46*pm, darkfeld
wrote:
I am working in Microsoft Excel 2003. *I am trying to sum certain ranges in
multiple lines of data. *An example of my spreadsheet is below. *The way it
is now, the "END BALANCE" row is not including the amount in the CDU field
(row 1 and 8). *I need to be able to sum rows 1-5 with results on row 6 and
then sum rows 8-14 with results on row 15, etc. *Any ideas?

* * * * A * * * * * * * B * * * * * * * C
1 *NAME * * * * CDU * * * * * * 3.42
2 *INCOME * * * * * * * * * * * * * * * 1..31
3 *BOND * * * * * * * * * * * * 1.29
4 *BALANCED * * * * * * * * * * 5.42
5 *LARGE-CAP * * * * * * * * * *3.05
6 *END BALANCE * * * * * * * * *11.07
7 *0
8 *NAME * * * * CDU * * * * * * 5.42
9 *INCOME * * * * * * * * * * * * * * * 6..31
10 BOND * * * * * * * * * * * * 18.29
11 BALANCED * * * * * * * * * * 53.42
12 LARGE-CAP * * * * * * * * * *35.05
13 MID-CAP * * * * * * * * * * *2.00
14 WORLD * * * * * * * * * * * * * * * *5..00
15 END BALANCE * * * * * * * * *120.07


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 342
Default sum a specific range

You could paste this macro into a module in your workbook, make sure the
spreadsheet in question is active then run this macro. I think it is what
you want.

Tom

Sub InsertTotals()

Dim dblStart As Double
Dim dblCounter As Double

For dblCounter = 1 To ActiveSheet.UsedRange _
..Rows(ActiveSheet.UsedRange.Rows.Count).Row
If ActiveSheet.Cells(dblCounter, 1).Value = "NAME" Then
dblStart = dblCounter
End If
If ActiveSheet.Cells(dblCounter, 1).Value = "END BALANCE" Then
ActiveSheet.Cells(dblCounter, 3).Value = _
"=sum(C" & dblStart & ":c" & dblCounter - 1 & ")"
End If
Next dblCounter

End Sub
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default sum a specific range

Could you pls provide the example sheet with 45-50
Is there only one blank row or more with in range?

For Ex: A B C
1 DATA 240
2 DATA 250
3 DATA300
4 BLANK
5 DATA 600
6 DATA 700
7 BLANK
8 DATA 400
9 DATA 500
10 DATA 300
11 DATA 800
12 BLANK


If there is one blank row then its very simple without using macro or
coding and or even without Complicated Formulas.

Regards

Hardeep kanwar

"darkfeld" wrote:

I have about 10,000 rows of data. Will I have to do that manually? I just
need to somehow name the range between the CDU# and the line before the END
BALANCE #.

"TomPl" wrote:

I guess you wanted to include the CDU row so change the formulas to:

Enter the formula =sum(C1:C5) in cell C6
Enter the formula =sum(C8:C14) in cell C15

Tom

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
How to transfer specific range to another range ? ghost Excel Discussion (Misc queries) 0 June 11th 08 05:10 PM
how many times a specific value is in a range...? Dan B Excel Worksheet Functions 2 November 8th 06 10:45 PM
Count Specific word in specific range [email protected] Excel Worksheet Functions 2 May 16th 06 10:30 AM
Count If Specific word in specific range [email protected] Excel Discussion (Misc queries) 2 May 16th 06 10:14 AM
MEDIAN, STDEV of a range IF another range = specific value Barb Reinhardt Excel Worksheet Functions 6 April 26th 06 05:18 PM


All times are GMT +1. The time now is 09:09 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"