• Excel macro (Excel 2003)

    Author
    Topic
    #454134

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #1126598

      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

    • #1126601

      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

    Viewing 1 reply thread
    Reply To: Excel macro (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: