+ Reply to Thread
Results 1 to 6 of 6

Inserting rows to consolidate column data

  1. #1
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Inserting rows to consolidate column data

    Hello Everyone,

    This is my first post, so take it easy on me. I'm very new to VBA (I have the VBA for dummies book)

    The sheet I'm working with has confidential information, but for examples sake, I'll say I have peoples names and info in A:D (these people give money), and I have 20 columns of data past that that contain names of people across the top (who receive money), and the cells contain a monetary amount exchanged between the people in the columns, and the people in the rows. Instead of having it in table form, I need to have it line by line that says Person A gives Person B "x" amount. I'd like to have something like Givers name and info in Columns A:D, Receiver in E, and amount in F.

    This sheet will be very large when it's done (15k rows of givers), so that will have to be kept in mind.

    I have attached an example worksheet to give a better understanding as it's hard to explain.

    Thanks so much!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Inserting rows to consolidate column data

    This assumes your data starts in Row 1

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Inserting rows to consolidate column data

    Just piped by Alpha. The same result.
    Attached Files Attached Files
    Last edited by AB33; 05-22-2013 at 01:24 PM.

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

    Re: Inserting rows to consolidate column data

    This, my offering, finds the first row as long as you have "Name" as the Header in Column A:

    Please Login or Register  to view this content.
    Since it's your first post:

    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Press ALT + F11 to open the Visual Basic Editor.

    Open a macro-enabled Workbook or save your Workbook As Macro-Enabled

    Select “Module” from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    Last edited by xladept; 05-22-2013 at 03:25 PM.
    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

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Inserting rows to consolidate column data

    @Obsessed - If that takes care of your question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    Thanks.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Inserting rows to consolidate column data

    Wow everyone! Thanks so much for all of the help! These all work perfectly! I'll hold on to all of them as I'm sure I'll need to tweak it in the future to adapt to other issues I may face.

    Thanks again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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