+ Reply to Thread
Results 1 to 2 of 2

Combine rows, no data loss

  1. #1
    Registered User
    Join Date
    11-11-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    54

    Question Combine rows, no data loss

    I was trying to find a combinator algorithm online, for excel sheets, and I found this webpage

    https://www.extendoffice.com/documen...ame-value.html

    Now I really need to figure the following algorithm from that page, and how possible is it that this algorithm is erroneous, like misses some data, or removes some.

    Can someone walk me through each line of the algorithm and tell me what it does?

    Please Login or Register  to view this content.
    Also I really think it is a good learning practice as well.
    Thank you www.excelforum.com!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Combine rows, no data loss

    Hi xinx,

    VBA Code like any code is like writing a story. Some are easier and others are more direct. The code you copied above is part of Kutools and can be done much easier than what they show. The create a variable type of "Collection" to gather those color words. They use variable names that don't make sense to me. If you are a good writer (and coder) you should pick variable names that have meaning like "LastRowA", meaning the last row in column A. That way when you (or others) read your code they don't need to look up to the original Dim statement to see what it means. I've written my own code to do the exact same thing as what you posted. Follow my code to see if you can learn from it.

    Please Login or Register  to view this content.
    Combine Colors VBA.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ 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. Combine data from two rows into one row
    By kre30a in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-13-2016, 01:45 PM
  2. Merge rows in case value in column is identical - without data loss
    By ali0179 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2016, 11:01 AM
  3. Combine Data in Multiple Columns to One Column Based on Data in Rows
    By exceldivx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-09-2014, 07:35 AM
  4. [SOLVED] Trading Spreadsheet - Random win/loss outcome against established Win/Loss %
    By cruze2005 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2014, 05:08 AM
  5. Replies: 8
    Last Post: 11-25-2013, 10:26 PM
  6. Combine Duplicate Rows and Combine Data in Rows
    By cherylmcgk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2013, 12:04 PM
  7. Combine two rows of data into one row
    By JoeyGirl in forum Excel General
    Replies: 8
    Last Post: 10-11-2010, 05:54 PM

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