+ Reply to Thread
Results 1 to 7 of 7

Excel macro to create a flat file?

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Excel macro to create a flat file?

    That might not even be a good title. Im not too sure how to even describe what I need to do. I need to have an excel sheet go from example 1 to example 2. Is this possible??? Could be a few thousand lines total. Once I get it flat (linear?) I can manipulate it from there. Thanks in advance!!

    Example 1:
    John 2300 1/1/2010
    John 500 2/12/2011
    John 650 2/01/2012

    Bob 1000 1/03/2010
    Bob 500 1/15/2011

    Jill 2500 1/05/2010
    Jill (300) 1/15/2011
    Jill 1200 1/30/2012
    Jill 600 9/30/2012

    Sara 1100 2/12/2011
    Sara (600) 2/01/2012

    Jane 6000 1/30/2010
    Jane (500) 2/12/2011
    Jane 1300 1/21/2012

    Example 2:
    John 2300 1/1/2010 500 2/12/2011 650 2/01/2012
    Bob 1000 1/03/2010 500 1/15/2011
    Jill 2500 1/05/2010 (300) 1/15/2011 1200 1/30/2012 600 9/30/2012
    Sara 1100 2/12/2011 (600) 2/01/2012
    Jane 6000 1/30/2010 (500) 2/12/2011 1300 1/21/2012
    Last edited by jlang11; 11-18-2013 at 03:06 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Excel macro to create a flat file?

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Excel macro to create a flat file?

    An other method :

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  4. #4
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Excel macro to create a flat file?

    Awesome John, that works like a charm (changed "Do Until ActiveCell.Row = 30" for the actual range on my details). Thank you so much.

    Thank you GC Excel, I will also try that one. ETA... that one only moved the first line. Which line is the one I should update to how many rows I have in the sheet?
    Last edited by jlang11; 11-18-2013 at 02:46 PM.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Excel macro to create a flat file?

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

  6. #6
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: Excel macro to create a flat file?

    Hi,
    this line
    Please Login or Register  to view this content.
    Should be
    Please Login or Register  to view this content.
    I assume your data started in cell A1.
    If you have a different range, you can do :
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-13-2012
    Location
    FL
    MS-Off Ver
    Excel 365
    Posts
    21

    Re: Excel macro to create a flat file?

    Quote Originally Posted by GC Excel View Post
    Hi,
    this line
    Please Login or Register  to view this content.
    Should be
    Please Login or Register  to view this content.
    I assume your data started in cell A1.
    If you have a different range, you can do :
    Please Login or Register  to view this content.
    Awesome!! I knew it had something to do with that line, just wasnt sure how to edit it correctly. 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. Formula or VBA to fill down a hierarchy to create a flat file
    By bmb163 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-28-2012, 09:34 AM
  2. Create flat file from data download
    By msmithdynamicsgp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2011, 09:54 PM
  3. Create Flat File from Macro
    By jackfsm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2009, 02:15 PM
  4. Macro to copy a column data to flat file or text file
    By vinaynagasani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2009, 10:56 AM
  5. PDF to Excel as flat file, via macro
    By CLR in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-18-2005, 10:06 AM

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