Posted to microsoft.public.excel.worksheet.functions
|
|
compare values in auto filter
Thanks for the suggestions - I'll try these out and see how they work. I
appreciate the help.
"Max" wrote:
Another play to tinker with ..
this one lays the desired results direct into col C (wo autofilter)
Assuming data in cols A and B, from row1 down
Let's assume the criteria's numeric value
for col B will be input into say, E1, viz. in E1: 2
Put in C1:
=IF(D1="","",IF(ISERROR(LARGE(D:D,COUNT($D$1:D1)+1 )),"----",INDEX(A:A,MATCH(LARGE(D:D,COUNT($D$1:D1)+1),D:D, 0))-A1))
Put in D1:
=IF(OR(A1="",B1="",$E$1=""),"",IF(B1$E$1,10^5-ROW(),""))
Select C1:D1, fill down to the last row that source data is expected
Col C will return the required results, viz: 3 in C1, 6 in C4, etc, with
"blanks" in between. As a flag/indicator, "----" will be returned in the
last row in col C where col B contains a value satisfying the criteria. So
for the sample data posted, we'd get a "----" returned in C6.
(Hide away the criteria col D if desired)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"uw805" wrote:
Can anyone tell me if there is a way to compare a value in an autofiltered
list to the value displayed below it? For example:
A B C
6/28/06 4
6/29/06 1
6/29/06 0
7/1/06 5
7/2/06 1
7/7/06 3
If I filter this list for column B 2, it would display rows 1, 4, and 6. I
would like to put a function in column C that would calculate the number of
days between the current row and the filtered row below it. So, that row
would show "3" in row 1 and "6" in column 2. I think something using
SUBTOTAL might work, but I can't figure it out.
The actual list I'll be using is over 5,000 lines, and the distance between
the dates could be very large. I cannot sort the list - it has to stay in
order due to other functions.
Thanks for your help.
|