Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Excel macro (Excel 2003)

    Hello - I need some help with a macro. I need to take the original sheet of the attached and have 2 macros. One to do step 1 and one to do the step 2 sheet.

    Step 1 takes the letters that are 1 row below the percents and puts them in a blank column next to the percent. The macro then deleted the row where the letters were.

    Step 2 removes the numbers above the percent and replaces it with the percent - but doesn't do this in COLUMN A. So the percents end up next to the text in column a.

    Can someone please help me with this? Thank you very much.
    Attached Files Attached Files

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

    Re: Excel macro (Excel 2003)

    Here is the first one:

    Sub Phase1()
    Dim r As Long
    Dim c As Long
    Range("C1,D1,E1,F1,G1").EntireColumn.Insert
    For r = 58 To 7 Step -3
    For c = 2 To 10 Step 2
    Cells(r + 1, c + 1) = Cells(r + 2, c)
    Next c
    Cells(r + 2, 1).EntireRow.Delete
    Next r
    End Sub

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

    Re: Excel macro (Excel 2003)

    And the second one:

    Sub Phase2()
    Dim r As Long
    For r = 41 To 7 Step -2
    Range(Cells(r + 1, 2), Cells(r + 1, 11)).Copy
    Range(Cells(r, 2), Cells(r, 11)).PasteSpecial xlPasteValuesAndNumberFormats
    Cells(r + 1, 1).EntireRow.Delete
    Next r
    End Sub

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel macro (Excel 2003)

    Fantastic! Thanks so much

Posting Permissions

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