Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    170
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro Help (Win and XL - XP)

    I want an if statement that basically says that If row cell A120 is zero (zed), delete rows 120 to 136, else if cell a120 is not zero, insert 5 rows. End If.

    I'm having trouble with syntax. Any help would be appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Help (Win and XL - XP)

    You didn't specify where the rows should be inserted; I assumed starting with row 120.

    If Range("A120") = 0 Then
    Range("120:136").Delete
    Else
    Range("120:124").Insert
    End If

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    170
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Help (Win and XL - XP)

    Hans,

    You make it seem so easy. Thank you!!!

Posting Permissions

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