+ Reply to Thread
Results 1 to 12 of 12

Creating a "Double Column" Report

Hybrid View

  1. #1
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Creating a "Double Column" Report

    Try this:

    Option Explicit
    
    Sub SplitRepX3(): Dim wm As Worksheet, wd As Worksheet
    Dim P, Q, R, d As Long, c As Long
    Set wm = Sheets("Master"): Set wd = Sheets("DoubleColumn")
    R = wm.UsedRange: d = Int(UBound(R) + 4) / 2: c = UBound(R) - d
    
    P = wm.Cells(1, 1).Resize(d, 4): Q = wm.Cells(d + 1, 1).Resize(c, 4)
    wd.Cells(1, 1).Resize(d, 4) = P: wd.Cells(4, 8).Resize(c, 4) = Q
    
    P = wm.Cells(1, 6).Resize(d, 1): Q = wm.Cells(d + 1, 6).Resize(c, 1)
    wd.Cells(1, 5).Resize(d, 1) = P: wd.Cells(4, 12).Resize(c, 1) = Q
    
    P = wm.Cells(1, 9).Resize(d, 1): Q = wm.Cells(d + 1, 9).Resize(c, 1)
    wd.Cells(1, 6).Resize(d, 1) = P: wd.Cells(4, 13).Resize(c, 1) = Q
    
    
    wd.Cells(1, 8).Resize(3, 6).Value = wd.Cells(1, 1).Resize(3, 6).Value
    End Sub
    Last edited by xladept; 05-04-2020 at 05:41 PM. Reason: Trim Output to 13 cols
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  2. #2
    Forum Contributor
    Join Date
    12-09-2015
    Location
    Virginia, USA
    MS-Off Ver
    Excel 365
    Posts
    129

    Re: Creating a "Double Column" Report

    Wow. This is great. It worked and it's really fast! I'll have to tweak some of the code just so I can grasp what is going on in the function, but was amazed that it worked right out of the box.

    Thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  2. [SOLVED] How to Add New Worksheet named "Report" and run loop through all the Sheets Except "Report
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-11-2016, 12:51 AM
  3. Replies: 11
    Last Post: 02-24-2016, 03:11 PM
  4. Formula for Creating a "Top Performer" feature on a production report?
    By h2holbro22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-14-2015, 03:09 PM
  5. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  6. Creating a "report" based on a search
    By tweitzel79 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2013, 04:42 PM
  7. Creating a "report" on results from logical IF's
    By LariRudi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2012, 01:28 AM

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