• SIMPLE copy (Excel xp)

    Author
    Topic
    #390931

    It’s been so long since I’ve touched anything to do with VBA that I can’t even think of the best way to do this.

    Very simple, I just want to copy from a range name CURRENT and paste value to a range name PREVIOUS.

    Very easy to record it, but it looks pathetic.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #696374

      Like this:

      Sub test()
      With ThisWorkbook
      .Names(“CURRENT”).RefersToRange.Copy Destination:=.Names(“PREVIOUS”).RefersToRange
      End With
      End Sub

      • #696382

        Thanks…but just to clarify, I need this to paste-value the range as the cells within CURRENT contain formulas.

        • #696391

          Now you tell me .

          Sub test()
          With ThisWorkbook
          .Names(“CURRENT”).RefersToRange.Copy
          .Names(“PREVIOUS”).RefersToRange.PasteSpecial Paste:=xlValues
          End With
          End Sub

    Viewing 0 reply threads
    Reply To: SIMPLE copy (Excel xp)

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

    Your information: