Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
HGood
 
Posts: n/a
Default macro - adding rows to a column that is summed

I have several columns in an income sheet. One column has a sum at the
bottom.

I want to be able to run a simple macro that will copy the last row of
formatted cells, just above the sum total, and insert it as a new row just
above the sum total so another line of data can be input.

But I want the sum total to sum also the newly inserted row. Presently I
can't figure out how to do it.

Example

A B C
1 24 Oct Dollars In $100
2 25 Oct Dollars out $25
3 Total $75


I want the macro to insert a new row for new data in row 3, so the total
will move to row 4. But I can't get the formula in the Total to increase. It
still only sums C1:C2. But after the macro runs I'd like the new cell C4 to
read =sum(C1:C3).

How can I do this?

Thanks,

Harold


  #2   Report Post  
Sandy Mann
 
Posts: n/a
Default

HGood,

To get the SUM to continue summing the column try:

=SUM($C$1:OFFSET(C3,-1,0))

HTH

Sandy

--
to e-mail direct replace @mailintor.com with @tiscali.co.uk


"HGood" wrote in message
...
I have several columns in an income sheet. One column has a sum at the
bottom.

I want to be able to run a simple macro that will copy the last row of
formatted cells, just above the sum total, and insert it as a new row just
above the sum total so another line of data can be input.

But I want the sum total to sum also the newly inserted row. Presently I
can't figure out how to do it.

Example

A B C
1 24 Oct Dollars In $100
2 25 Oct Dollars out $25
3 Total $75


I want the macro to insert a new row for new data in row 3, so the total
will move to row 4. But I can't get the formula in the Total to increase.

It
still only sums C1:C2. But after the macro runs I'd like the new cell C4

to
read =sum(C1:C3).

How can I do this?

Thanks,

Harold




  #3   Report Post  
HGood
 
Posts: n/a
Default

This worked so cool! Thanks Sandy,

Harold
========================
"Sandy Mann" wrote in message
...
HGood,

To get the SUM to continue summing the column try:

=SUM($C$1:OFFSET(C3,-1,0))

HTH

Sandy

--
to e-mail direct replace @mailintor.com with @tiscali.co.uk


"HGood" wrote in message
...
I have several columns in an income sheet. One column has a sum at the
bottom.

I want to be able to run a simple macro that will copy the last row of
formatted cells, just above the sum total, and insert it as a new row
just
above the sum total so another line of data can be input.

But I want the sum total to sum also the newly inserted row. Presently I
can't figure out how to do it.

Example

A B C
1 24 Oct Dollars In $100
2 25 Oct Dollars out $25
3 Total $75


I want the macro to insert a new row for new data in row 3, so the total
will move to row 4. But I can't get the formula in the Total to increase.

It
still only sums C1:C2. But after the macro runs I'd like the new cell C4

to
read =sum(C1:C3).

How can I do this?

Thanks,

Harold






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
Multiple rows of data on a single axis (charting) ramseysgirl Charts and Charting in Excel 8 December 29th 04 06:00 PM
Macro help Jeff Garrett Excel Discussion (Misc queries) 11 December 1st 04 08:47 PM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 2 November 27th 04 01:55 AM
How do I sort a column of formulas in Excel? Gordon Excel Discussion (Misc queries) 0 November 26th 04 03:19 PM
Macro for Show/Hide Column Andy Excel Discussion (Misc queries) 2 November 26th 04 01:03 PM


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