+ Reply to Thread
Results 1 to 2 of 2

Is there a formula/function to consolidate data into one line?

  1. #1
    Registered User
    Join Date
    08-24-2006
    Location
    Maryland
    Posts
    50

    Is there a formula/function to consolidate data into one line?

    Good Evening All,

    I seem to be in a bit of a bind. I messed up a report that I was working running. The end result left my "payment amounts" and "credit amounts" on different rows. I am trying to figure out some way (via VB or a formula) to make the amount in the "Credit amount" cell to appear in the same row, next to the Payment amount (that way all of my data is in one single row, not two).

    My example is attached. The dollar amounts that I wish to move are in bolded red text. The cells that I want those amounts to go into are highlighted in yellow. For example, My very first Patient name is "Joe Schmoe" (row 2). His payment amount was $20.00 and his credit amount was $15.00. I want the $15.00 to appear in the "Credit Amount" column right next to the $20.00 payment amount.

    Can anyone make sense of my question and give me a hand?

    P.S. I have Excel 2007, but saved my attachment as .xls, for compatibility reasons. If you know of a simple solution that is specific to Excel 2007, please let me know!

    Thank you so much in advance!
    Attached Files Attached Files

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

    Re: Is there a formula/function to consolidate data into one line?

    Try this:
    Please Login or Register  to view this content.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select MergeRows from the macro list.
    _________________
    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!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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