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
Bookmarks