LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 68
Default VBA to address first visible cell in Column "D" after filtering

2003

Having difficulty determining how to address in VBA the first visible
cell in Column "D" after the FilterCriteria changes.

Partial code follows:

Set Filter1 = Sheets("Constants Input").Range("A1:F" & _
Cells(Rows.Count, "D").End(xlUp).Row)
Filter1.AutoFilter Field:=2, Criteria1:="<"
Filter1.AutoFilter Field:=4, Criteria1:="=" & FilterCriteria

up to this point all is well


Set Filter2 = Nothing
Set Filter2 = Filter1.SpecialCells(xlCellTypeVisible)
'I thought that (after) Filter2 the Visible cells would be
' reset which they are on the screen
myCell.Offset(0, 3).Formula = Filter2.Range("E2").Formula

I thought that after filtering Filter1 that I could Set Filter2
(visable cells) and that Filter1.Range("E2").Formula and
Filter2.Range("E2").Formula would be different
but they are the same.

In short, I want all visible cells after filtering in Column E to have
exactly the same formula as in the first visible cell in Column E each
time that the FilterCriteria changes. What happens is that all visible
cell formulas are the same as the very first cell in E irrespective of
the FilterCriteria.

I need to know how in VBA to address that first cell in Column E;
AFTER each FilterCriteria changes.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run a macro in a locked cell Ray Excel Discussion (Misc queries) 8 January 10th 06 12:02 AM
Can the column index in a cell address be made variable? cyberdude Excel Discussion (Misc queries) 1 November 20th 05 02:47 AM
tried using SUBTOTAL function (XL XP) and it doesn't seem to work JethroUK© New Users to Excel 12 August 22nd 05 07:33 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"