Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 184
Default Subtotal Function - add formula to all blank rows

Hi:
You all probably know that when you use the subtotal function it adds a
blank line with totals below the columns that you specify. Is there a way to
get the blank lines to fill using the row above the blank cell? I can add a
formula manually but I have over 50 spreadsheets so I hoped that there was a
code that would add the contents of the row above if the cell is blank.

Example:
Columns -
Customer Name SalesRep Total Sales$

no data appears in the Customer Name and Sales Rep - only Total Sales$ since
that column holds the subtotals. I need a code that will say if the cell is
blank after subtotal then add the contents of the row (cell) above. This will
show me the data in each row once I expand the (+) to the left. Please help...





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Subtotal Function - add formula to all blank rows

Nikki wrote:
Hi:
You all probably know that when you use the subtotal function it adds a
blank line with totals below the columns that you specify. Is there a way to
get the blank lines to fill using the row above the blank cell? I can add a
formula manually but I have over 50 spreadsheets so I hoped that there was a
code that would add the contents of the row above if the cell is blank.

Example:
Columns -
Customer Name SalesRep Total Sales$

no data appears in the Customer Name and Sales Rep - only Total Sales$ since
that column holds the subtotals. I need a code that will say if the cell is
blank after subtotal then add the contents of the row (cell) above. This will
show me the data in each row once I expand the (+) to the left. Please help...






First, consider a PivotTable instead of SubTotals.

Second, if you insist on SubTotals, after adding them, collapse the detail so
only the SubTotal lines are shown. Select the first visible cell in one of the
blank columns. If it is cell B23, add the formula "=B22" (without the quotes).
This should give you the result you want. Copy that cell, then select all of
the cells you want filled. Select Edit / Go To / Special / Visible Cells Only /
OK / Edit / Paste and you are done.
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
SubTotal function to return number of rows returns only zero DZ Excel Worksheet Functions 6 May 3rd 23 05:06 PM
subtotal blank cells The Rook[_2_] Excel Discussion (Misc queries) 2 September 19th 08 01:16 AM
Pivot Table - Blank SubTotal in Calculated Field Guilk Excel Worksheet Functions 0 January 3rd 08 11:16 PM
formula to remove blank rows Bryan Excel Discussion (Misc queries) 1 January 25th 06 03:52 PM
Formula to hide blank rows Ladyra Excel Worksheet Functions 4 February 25th 05 06:55 PM


All times are GMT +1. The time now is 04:09 AM.

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"