Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
TJN TJN is offline
external usenet poster
 
Posts: 10
Default copy cell above - use with subtotals

When I use the subtotals function in Excel, I have the subtotal added to the
row below each change in criteria. My problem is that I only need the
subtotals and when I hide the other rows I lose some information - such as a
property identifier in column A.

I was wondering if anyone had ever written a macro that would evaluate each
cell in column A and if it was blank, have the macro copy the contents of the
cell directly above it. For example, if Cell A13 is blank (because Excel
used row 13 to subtotal some lines above it), have the Macro copy the
contents of Cell A12 into Cell A13. If a cell in column A already has data,
I want to leave the cell as is.

I would need this to cycle through all the rows in the spreadsheet - the
number of rows changes each month.

Thanks,

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default copy cell above - use with subtotals

If all you are looking for is the subtotal why not use a pivot table. In a
pivot table you can show only the aggregates without any of the details. All
of the appropriate hedings are shown and IMO they look better in the end.
--
HTH...

Jim Thomlinson


"TJN" wrote:

When I use the subtotals function in Excel, I have the subtotal added to the
row below each change in criteria. My problem is that I only need the
subtotals and when I hide the other rows I lose some information - such as a
property identifier in column A.

I was wondering if anyone had ever written a macro that would evaluate each
cell in column A and if it was blank, have the macro copy the contents of the
cell directly above it. For example, if Cell A13 is blank (because Excel
used row 13 to subtotal some lines above it), have the Macro copy the
contents of Cell A12 into Cell A13. If a cell in column A already has data,
I want to leave the cell as is.

I would need this to cycle through all the rows in the spreadsheet - the
number of rows changes each month.

Thanks,

Tim

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
Copy subtotals ExcelMan Excel Discussion (Misc queries) 1 July 18th 07 02:01 AM
Subtotals copy paste Seebu Excel Worksheet Functions 1 March 20th 06 02:59 PM
Copy subtotals Diane Excel Discussion (Misc queries) 7 September 29th 05 04:00 PM
How do I copy an outline w/ subtotals & paste just the subtotals av Excel Discussion (Misc queries) 1 June 20th 05 11:35 PM
When using subtotals, how do I copy and paste only the subtotals . Wendy Excel Worksheet Functions 1 February 13th 05 05:28 AM


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