![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
i have a spread sheet that pulls data entered by different users from different files. the master spread sheet has empty rows to show new info that is read from the other worksheets. to avoid viewing these empty rows until they're used, i use the autofilter to show only nonblanks in the first column. what i am seeing is that if someone enters new info for a previously blank row, the autofilter does not automatically include this info as a nonblank, and that i have to refilter to get the new row to appear. does anyone know a way to make the autofilter autoupdate itself ?
[ This Message was edited by: roadrunnr4 on 2002-05-23 10:50 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Right click on the sheet tab, click view code. in the VBA editor, from the left drop down box at the top choose Worksheet then enter the following code, assuming the column to apply the non-blanks filter to is in column A.
Private Sub Worksheet_Calculate() Workbooks("Yourfile.xls").Sheets("Yoursheet").Activate Range("A1").AutoFilter Field:=1, Criteria1:="<>" End Sub
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Location: Milton Keynes - UK
Posts: 95
|
I have a similar problem...
How can i modify that code so that if the user puts an 'x' in a cell in column A, the autofilter on sheet2 automatically updates and shows the 'x' marked rows only? Cheers for any help! |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Location: Milton Keynes - UK
Posts: 95
|
that's ok.... sussed it...!
you have know idea how usefull that's going to be next week...! |
|
|
|
|
|
#5 | |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Quote:
Range("A1").AutoFilter Field:=1, Criteria1:="<>" to: Range("A1").AutoFilter Field:=1, Criteria1:="x"
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
|
#6 |
|
New Member
Join Date: May 2002
Posts: 2
|
that works perfectly ! thanks a lot !
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|