Consulting

Results 1 to 2 of 2

Thread: Solved: .Find and activate a Visible Cell within a Filtered Range

  1. #1
    VBAX Contributor
    Joined
    Aug 2011
    Posts
    126
    Location

    Solved: .Find and activate a Visible Cell within a Filtered Range

    I'm trying to return values from adjacent columns based on the location of a cell within Filtered Data.

    [vba]
    Dim LastRow As Long
    With Worksheets("savedwork")
    LastRow = .Range("K" & Rows.Count).End(xlUp).Row
    .Range("K2:K" & LastRow).Find(TankNo)
    End With

    [/vba]

    This is followed by a list of commands such as:

    [vba]

    TankHeight = ActiveCell.Offset(0, 1)
    TankDia = ActiveCell.Offset(0, 2)

    [/vba]

    Help ?

  2. #2
    VBAX Contributor
    Joined
    Aug 2011
    Posts
    126
    Location
    For My Application... I got it worked out.

    I was able to setup multiple filter fields to return the information I needed.
    Then call for the last row in the column to be selected.

    [vba]
    Sheets("savedwork").Activate
    ActiveSheet.AutoFilterMode = False
    Range("A1").AutoFilter field:=1, Criteria1:=Owner

    Range("A1").AutoFilter field:=2, Criteria1:=FacilityID
    Range("A1").AutoFilter field:=11, Criteria1:=TankNo
    ActiveSheet.Range("A:A").Range("K" & Rows.Count).End(xlUp).Select
    TankHeight = ActiveCell.Offset(0, 1)
    TankDia = ActiveCell.Offset(0, 2)
    'etc, etc, etc...
    [/vba]

    Thanks...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •