Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default dragging a formula in a filtered table

I have a table and I filtered to get specific rows. Now I want to define a
formula in only visible rows. Like subtract the lower cell from the above
cell but this becomes: AI15=(L15-L4) in filtered table. Up till here it is OK
Now I want to drag this formula down but it perform the formula if the
hidden rows are visible. AI30=(L30-L19)
Is there any solution to this?
--
R. Khoshravan
Please click "Yes" if it is helpful.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: dragging a formula in a filtered table

Yes, there is a solution to this. When you drag a formula in a filtered table, Excel will perform the formula in all the rows, including the hidden ones. However, you can use the SUBTOTAL function instead of the regular function to perform calculations only on visible cells.

Here are the steps to follow:
  1. Select the cell where you want to enter the formula (AI15 in your example).
  2. Enter the formula using the SUBTOTAL function instead of the regular function. For example, if you want to subtract the lower cell from the above cell, you can use the following formula:
    Formula:
    =SUBTOTAL(9,L15:L4)-SUBTOTAL(9,L14:L3
  3. Press Enter to apply the formula to the selected cell. The result will be displayed in the cell.
  4. Now, select the cell with the formula and drag it down to the cells where you want to apply the formula (AI30 in your example).
  5. Release the mouse button to apply the formula to the selected cells.

Excel will now perform the formula only on the visible cells, even if you have filtered the table. The SUBTOTAL function ignores hidden rows and performs calculations only on visible cells.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default dragging a formula in a filtered table

Hi Khoshravan,

You can copy the formula the select the filtered range, where you want to
paste this formula, now press alt+; on your keyboard and paste- special -
formulas. This will paste the formula only on visible cells.

Please click on "yes", if it helps. Thanks.
--
Dilip Kumar Pandey
MBA, BCA, B.Com(Hons.)


New Delhi, India


"Khoshravan" wrote:

I have a table and I filtered to get specific rows. Now I want to define a
formula in only visible rows. Like subtract the lower cell from the above
cell but this becomes: AI15=(L15-L4) in filtered table. Up till here it is OK
Now I want to drag this formula down but it perform the formula if the
hidden rows are visible. AI30=(L30-L19)
Is there any solution to this?
--
R. Khoshravan
Please click "Yes" if it is helpful.

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
I need help dragging a formula down tarabull Excel Discussion (Misc queries) 16 October 3rd 08 06:06 PM
pivot table - dragging fields Raf Rollier Excel Discussion (Misc queries) 2 September 12th 08 02:13 PM
Pivot Table - Dragging multiple items into data field J@Y Excel Discussion (Misc queries) 1 January 12th 07 12:52 AM
Create new excel table with filtered records from another table Berne van de Laar Excel Worksheet Functions 3 July 3rd 06 12:14 AM
Populating a table with filtered result of another table pikakathy Excel Discussion (Misc queries) 7 January 11th 06 12:04 AM


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