Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with changing column reference in formula | Excel Worksheet Functions | |||
How do I keep my chart from changing when excel has autofilter? | Charts and Charting in Excel | |||
Prevent formula reference from changing | Excel Discussion (Misc queries) | |||
A cell reference in a formula changing | Excel Worksheet Functions | |||
HOW DO I COPY FORMULA WITHOUT CHANGING CELL REFERENCE | Excel Discussion (Misc queries) |