Welcome to Windows Help!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Visible row index after applying a filter in Excel

 
   Windows Help (Home) -> Microsoft Excel RSS
Next:  CODE for EXCEL output not executing in access - P..  
Author Message
Hasmet Akgun

External


Since: Jan 22, 2010
Posts: 1



(Msg. 1) Posted: Fri Jan 22, 2010 11:57 am
Post subject: Visible row index after applying a filter in Excel
Archived from groups: microsoft>public>excel (more info?)

Does anyone know an excel function that will give the index of the
visible row after filtering or sorting a table? Say, I have a table like
this:

type time place
c 12:20 1
f 12:40 2
c 13:30 3
f 14:20 4

Table is sorted with respect to time, and place refers to the index of
each row in this order. Now, if I filter by type 'f', the table would
still be sorted, but would have only two visible rows. In such a case,
I'd like the place row to be like [#NA, 1, #NA, 2], reflecting that rows
1 and 3 are invisible, first place is row #2 (but is now visible row
#1), and second place is row #4.

 >> Stay informed about: Visible row index after applying a filter in Excel 
Back to top
Login to vote
Hctor Miguel

External


Since: Jan 23, 2010
Posts: 3



(Msg. 2) Posted: Sat Jan 23, 2010 12:28 am
Post subject: Re: Visible row index after applying a filter in Excel
Archived from groups: per prev. post (more info?)

hi, Hasmet !

assuming place in column "C" and data begins in row2, try this starting formula:

[C2] =subtotal(3,a$1:a2)-1

and copy/drag/... down (as needed)

hth,
hector.

__ OP __
> Does anyone know an excel function that will give the index of the visible row after filtering or sorting a table?
> Say, I have a table like this:
> type time place
> c 12:20 1
> f 12:40 2
> c 13:30 3
> f 14:20 4
> Table is sorted with respect to time, and place refers to the index of each row in this order.
> Now, if I filter by type 'f', the table would still be sorted, but would have only two visible rows.
> In such a case, I'd like the place row to be like [#NA, 1, #NA, 2], reflecting that rows 1 and 3 are invisible
> first place is row #2 (but is now visible row #1), and second place is row #4.

 >> Stay informed about: Visible row index after applying a filter in Excel 
Back to top
Login to vote
Mike

External


Since: Jan 27, 2010
Posts: 1



(Msg. 3) Posted: Wed Jan 27, 2010 10:32 am
Post subject: Re: Visible row index after applying a filter in Excel
Archived from groups: per prev. post (more info?)

"Hasmet Akgun" wrote in message

> Does anyone know an excel function that will give the index of the visible
> row after filtering or sorting a table? Say, I have a table like this:
>
> type time place
> c 12:20 1
> f 12:40 2
> c 13:30 3
> f 14:20 4
>
> Table is sorted with respect to time, and place refers to the index of
> each row in this order. Now, if I filter by type 'f', the table would
> still be sorted, but would have only two visible rows. In such a case, I'd
> like the place row to be like [#NA, 1, #NA, 2], reflecting that rows 1 and
> 3 are invisible, first place is row #2 (but is now visible row #1), and
> second place is row #4.

This is how I solved this. I created a function call IsRowHidden

Function IsRowHidden(rownum As Integer) As Boolean
IsRowHidden = False
On Error Resume Next
IsRowHidden = Rows(rownum).Hidden


End Function

then in my data, I had a column with the following formula.

=IF(IsRowHidden(ROW(AN2)),AN1+0.00001,INT(AN1+1)) where AN is the column the
formula is in. When the data is filtered

The filtered rows will always be 1,2,3 etc.

Mike
 >> Stay informed about: Visible row index after applying a filter in Excel 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
help with Index / match - I am using Excel 2003 and I'm trying to create a formula to look up a value in a Pivot table. The pivot table results would be: Date DB CVT ACD PKT 5/21 0.1 2.1 1.2 5/22 .01 1 5/23 1.1 ...

INDEX MATCH HELL ooops.. I mean HELP! - I know (or at least I think I do) that I can do this with INDEX MATCH. Here is what I want to do. I want to place this formula in cell C4 of Sheet 1. What I want this formula to do is to match the value of B2 of Sheet 1 with a list that is in Sheet 2...

Formulas Instead of Advanced Filter - Hi there, I have Excel 2003 and want to have formulas that do the same work as Advanced Filtering. I currently have a system that looks at data in one column (X) and, with a mixture of If, Index and Match formulas, determines unique data and places...

Filter rows/transactions to another sheet. - Hi I have a sheet with 6500 transactions in rows. Each row contains an account no, amount, etc I would like to have Excel automatically copy all the rows/transactions on each account to a separate sheet in the same workbook (one account per sheet)....

advance filter unique records except on column - Is there a way to filter a database to find unique records where one column is ignored? I have over 6,000 records with the following columns. Cust_rec, Bco, pol_csr, Expires, Cust_name, Cust_attn, Pol_type I want to eliminate duplicates..
   Windows Help (Home) -> Microsoft Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]