Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Sum a column

newbie04,
How do you know which values in LHS are true values and which are sums of
the numbers above ?

NickHK

"newbie04 " wrote in message
...
i have a series of data :

2 2
5 5
7
1 1
0 0
3 3
6 6
10
2 2
9 9
11

The LHS is the original data while the RHS is the data i wanna obtain.
My doubts is that what is the code for summing?

Thank you.


---
Message posted from http://www.ExcelForum.com/



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum a column

Hi nick,

okie, my original data is shown
2
5

1
0
3
6

2
9

And i wanna get the result:
2
5
7
1
0
3
6
10
2
9
11

I know the logic to scan the empty column and do the sum, but it seem
that z is not valid here. May i know why?

Worksheets(a).cells(i,j)Select
ActiveCell.formula = "=SUM(R[-z]C:R[-1]C)

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Sum a column

newbie04,
If your data is split like that, with an empty line between, one way is to
use Data -- Subtotal menu to achieve what you want. That way Excel takes
care of which are real values and which are (sub) totals.

NickHK

"newbie04 " wrote in message
...
Hi nick,

okie, my original data is shown
2
5

1
0
3
6

2
9

And i wanna get the result:
2
5
7
1
0
3
6
10
2
9
11

I know the logic to scan the empty column and do the sum, but it seems
that z is not valid here. May i know why?

Worksheets(a).cells(i,j)Select
ActiveCell.formula = "=SUM(R[-z]C:R[-1]C)"


---
Message posted from http://www.ExcelForum.com/



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
divide column(x) by column(y) to give column(x/y) in excel? James New Users to Excel 2 April 24th 23 11:46 AM
Referencing date column A & time column B to get info from column TVGuy29 Excel Discussion (Misc queries) 1 January 24th 08 09:50 PM
Return text in Column A if Column B and Column K match jeannie v Excel Worksheet Functions 4 December 13th 07 07:36 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
Divide Column A by Column B multiply Column C Stumped Excel Worksheet Functions 3 December 28th 05 05:51 AM


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