+ Reply to Thread
Results 1 to 6 of 6

Pase Special while recording a Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Pase Special while recording a Macro

    Thanks for the help. That code helps for part of the issue, but I want the macro button to select each option from the drop down menue and then input the results in the combined results chart. I want to see the results for each option in the results chart while only selecting the macro button once.

    thanks in advance for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Pase Special while recording a Macro

    Hi

    Then use the following code
    Sub results_macro()
        Dim dest As Long, count As Long, i As Long
        count = WorksheetFunction.CountA(Range("I:I"))
        For i = 2 To count
        Range("B2") = Cells(i, "I")
            
        dest = WorksheetFunction.Match(Range("B2"), Range("B13:B15"), 0)
        Range("B7").Copy
          
        Range("C12").Offset(dest, 0).PasteSpecial Paste:=xlPasteValues
        Application.CutCopyMode = False
        Next i
        
    End Sub
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1