Results 1 to 2 of 2

Thread: How do I fix this VBA Code?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How do I fix this VBA Code?

    Dim i As Integer
    i = 20
    Do While i <= 2215
        Range("Z3:Z19").Select
        Range(Selection, Selection.End(xlDown)).Select
        ActiveWindow.SmallScroll Down:=6Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
        Formula1:="='Look up Tables'!Zi"
        Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
        With Selection.FormatConditions(1).Font
            .Color = -16383844
            .TintAndShade = 0
        End With
        With Selection.FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 13551615
            .TintAndShade = 0
        End With
        Selection.FormatConditions(1).StopIfTrue = False
        i = i + 1
    Loop
    I know it's wrong, but I don't understand how something like this wouldn't work. Also, how would I get it to work and still do the same thing?
    Last edited by Aussiebear; 04-26-2023 at 12:13 PM. Reason: Adjusted the code tags

Posting Permissions

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