A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to use autofilter in excel with formula reference changing



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2010, 08:36 PM posted to microsoft.public.excel.worksheet.functions
Marcio
external usenet poster
 
Posts: 8
Default How to use autofilter in excel with formula reference changing

Hi,
I have a table
A B C
1 forro 120
2 ment 80 40
3 forro 50 30
4 ment 40 10
5 ment 30 10
6 forro 20 10
7 forro 10 10
8 forro 5 5



Starting from C2, the column C has a formula (=B1-B2) result = 40; (=B2-B3)
result = 30; etc...

When I apply autofilter the formula in cell C keeps the original information
(=B1-B2), and I would like to have a formula to change and shows de result as
below (=B1-B3) result = 70; (=B3-B6) result = 30; etc...
A B C
1 forro 120
3 forro 50 70
6 forro 20 30
7 forro 10 10
8 forro 5 5

The objective is to have a formula considering just the visible cells.

Thank you,
Marcio
  #2  
Old April 28th, 2010, 01:29 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default How to use autofilter in excel with formula reference changing

This seems overly complex but it works...

Array entered in C2 and copied down as needed.

=INDEX(B$1:B$8,MATCH(SUBTOTAL(3,B$1:B1),SUBTOTAL(3 ,OFFSET(B$1:B$8,,,ROW(B$1:B$8)-ROW(B$1)+1)),0))-INDEX(B$1:B$8,MATCH(SUBTOTAL(3,B$1:B1)+1,SUBTOTAL( 3,OFFSET(B$1:B$8,,,ROW(B$1:B$8)-ROW(B$1)+1)),0))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Marcio" wrote in message
...
Hi,
I have a table
A B C
1 forro 120
2 ment 80 40
3 forro 50 30
4 ment 40 10
5 ment 30 10
6 forro 20 10
7 forro 10 10
8 forro 5 5



Starting from C2, the column C has a formula (=B1-B2) result = 40;
(=B2-B3)
result = 30; etc...

When I apply autofilter the formula in cell C keeps the original
information
(=B1-B2), and I would like to have a formula to change and shows de result
as
below (=B1-B3) result = 70; (=B3-B6) result = 30; etc...
A B C
1 forro 120
3 forro 50 70
6 forro 20 30
7 forro 10 10
8 forro 5 5

The objective is to have a formula considering just the visible cells.

Thank you,
Marcio



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.