Consulting

Results 1 to 2 of 2

Thread: Sleeping: Selecting Hidden Cells & Auto fill

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Location
    Surrey, B.C.
    Posts
    8
    Location

    Sleeping: Selecting Hidden Cells & Auto fill

    I have two problems that I need your help with.

    The first is I need to select cells that are in hidden columns. They will always be in row 6. What I need to do is select the first hidden column, row 6. It will keep changing as the weeks go on. The first week, the first hidden column is V, so I need V6 selected. The next week the first hidden column will now be W.

    My second problem is there any way to Auto fill a formula down to the cell in the last row with data in it. The last row used will change constantly so I can't use cell references. I also can't use regions as there is some rows with no data in them.

    Thanks in advance for all your help. This forum is the best, with such friendly, helpful and knowledgable members.

    Darlene

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Why do you need to select the hidden cell? It may not be necessary to select. We cal probably use Cells() here. Let's say Col represents the Column then:
    Cells(6, Col).Select
    You can determine the last row like this:
    LastRow = Range("A65536").End(xlUp).Row
    Then to Auto Filter:
    Range("A1:A2").AutoFill Destination:=Range("A1:A" & LastRow), Type:=xlFillDefault

Posting Permissions

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