Results 1 to 5 of 5

Thread: Unpivot Columns in Excel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    19
    Rep Power
    0
    issue: I put it into my PERSONAL, but in running it I got a "Subscript out of Range" at this line:
    Code:
     .Range("a1").Resize(, UB2).Value = ThisWorkbook.Worksheets(Replace(ShtName, i - 2, "")).Range("a1").Resize(, UB2).Value
    . I got around that by changing "ThisWorkbook" to "ActiveWorkbook", and that seemed to fix the problem.

    Whoops, there were 2 more instances of "ThisWorkbook" that I had to change to "ActiveWorkbook"
    Last edited by jomili; 12-15-2017 at 06:37 PM.

Similar Threads

  1. Replies: 0
    Last Post: 03-27-2016, 02:26 AM
  2. Excel VBA to copy and paste columns
    By gripper in forum Excel Help
    Replies: 4
    Last Post: 04-15-2015, 06:03 PM
  3. Replies: 1
    Last Post: 01-19-2014, 04:45 PM
  4. Macro To Insert Columns In Excel
    By jac3130 in forum Excel Help
    Replies: 2
    Last Post: 05-17-2013, 07:49 AM
  5. Validating 2 Columns using excel VBA
    By freakszzy in forum Excel Help
    Replies: 2
    Last Post: 07-26-2012, 12:46 PM

Tags for this Thread

Posting Permissions

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