Results 1 to 9 of 9

Macro to select visible rows containg data in filtered list

Threaded View

  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    Ottawa
    MS-Off Ver
    Excel 2010
    Posts
    22

    Thumbs up Macro to select visible rows containg data in filtered list

    Hi,

    I am new to the forum as this is my first post. I'm looking for help on a macro that I have been beating myself up over. I work on an excel file that updates daily by calling upon other programs to return data from the appropriate queries. I have header cells located in row# 11 which are constant. The amount of rows may or may not increase daily changing the location of data constantly (ex. row 30 moves to 31).

    I am looking to create a macro that will:

    1. Select the filtered visible rows containg data in column "A",
    2. Fill the selected rows with a colour (colour coding purposes)
    3. Input value (Y) into column "DK"

    I have attached two photos to provide a look at the type of excel file I'm working with.
    Excel forum 2.png
    Excel Forum 1.png

    I was using a If-Then-Else with a loop construct but I have had no luck. My second choice was a For-Next loop and I can't seem to define the statement correctly.
    Below is what I started with and no success. Any help would be much appreciated, thanks.

    Rows("47:50").Select
        Selection.SpecialCells(xlCellTypeVisible).Select
        With Selection.Interior
            .PatternColorIndex = xlAutomatic
            .ThemeColor = xlThemeColorDark1
            .TintAndShade = -0.249977111117893
            .PatternTintAndShade = 0
        End With
        
        Range("FQ47").Select
        ActiveCell.FormulaR1C1 = "Y"
        Selection.FillDown
    End Sub
    Last edited by knevil; 07-15-2013 at 03:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1