Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Need Help ASAP!! VBA cell addressing after Filter

2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Need Help ASAP!! VBA cell addressing after Filter

Check your other post.

Dennis wrote:

2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Need Help ASAP!! VBA cell addressing after Filter

I think Dave Peterson got it for me in Excel.Misc

Thanks all

Dennis wrote:
2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Need Help ASAP!! VBA cell addressing after Filter

Sub firstcellinfilteredrng()
Range("a2:a22").SpecialCells(xlVisible).Cells(1, 1).Select
End Sub

--
Don Guillett
SalesAid Software

"Dennis" wrote in message
oups.com...
2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Need Help ASAP!! VBA cell addressing after Filter

Thanks Don!!!

Dennis


Don Guillett wrote:
Sub firstcellinfilteredrng()
Range("a2:a22").SpecialCells(xlVisible).Cells(1, 1).Select
End Sub

--
Don Guillett
SalesAid Software

"Dennis" wrote in message
oups.com...
2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Need Help ASAP!! VBA cell addressing after Filter

Glad to help

--
Don Guillett
SalesAid Software

"Dennis" wrote in message
oups.com...
Thanks Don!!!

Dennis


Don Guillett wrote:
Sub firstcellinfilteredrng()
Range("a2:a22").SpecialCells(xlVisible).Cells(1, 1).Select
End Sub

--
Don Guillett
SalesAid Software

"Dennis" wrote in message
oups.com...
2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Need Help ASAP!! VBA cell addressing after Filter

Dave,
I am having a problem with both proposals.

With yours, I need the cell formula to be exactly as the formula in
"effectively" "E2"
all the way for the filtered cwells. Currently I am getting formulas
which are incrementing.

TIA Dennis


Dave Peterson wrote:
Check your other post.

Dennis wrote:

2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.


--

Dave Peterson


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Need Help ASAP!! VBA cell addressing after Filter

What's the formula in one of the cells in E2 (after you filter)?

Dennis wrote:

Dave,
I am having a problem with both proposals.

With yours, I need the cell formula to be exactly as the formula in
"effectively" "E2"
all the way for the filtered cwells. Currently I am getting formulas
which are incrementing.

TIA Dennis

Dave Peterson wrote:
Check your other post.

Dennis wrote:

2003

Until today, I have never asked for ASAP! To make it worse this is the
second posting.
Send me the Crow and I'll eat it! I have to "make this work or else"
?!? NO kidding

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.


--

Dave Peterson


--

Dave Peterson
Reply
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
Cell Addressing John Calder New Users to Excel 3 March 9th 07 12:32 PM
Cell addressing Mike Excel Worksheet Functions 0 November 30th 06 02:51 PM
Cell addressing John Excel Worksheet Functions 0 November 30th 06 12:40 PM
Cell addressing Mike Excel Worksheet Functions 0 November 30th 06 09:02 AM
VBA Cell Addressing Bill Martin -- (Remove NOSPAM from address) Excel Discussion (Misc queries) 5 March 16th 05 09:51 PM


All times are GMT +1. The time now is 08:47 PM.

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

About Us

"It's about Microsoft Excel"