Consulting

Results 1 to 3 of 3

Thread: If Greater than formula

  1. #1

    If Greater than formula

    Help changing this section of code:
    [VBA]
    End With
    For r = 2 To LRow2
    If Cells(r, "C").Value > 998 Then Cells(r, "A").Value = ""
    Next r

    End Sub
    [/VBA]

    This line replaces column "A" w/ "", what I need it to do is replace the entire line w/ "" if the value > 998.

    Help please?

    Thanks,

    YLP

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Yelp!

    [vba]' If Cells(r, "C").Value > 998 Then Cells(r, "A").Value = ""
    If Cells(r, "C").Value > 998 Then Rows(r).ClearContents[/vba]

    Didn't you ask this one before?
    Matt

  3. #3
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    [VBA]

    For r = 2 To LRow2
    If Cells(r, "C").Value > 998 Then Range(r:r).ClearContents
    Next r

    [/VBA]

Posting Permissions

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