+ Reply to Thread
Results 1 to 6 of 6

Macro to conanceate three cols.

  1. #1
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Smile Macro to conanceate three cols.

    Hello all,
    I am wanting to get a simple macro that can give me the results I have in col CE.

    The function in col CE is conanceating cols BJ, BK, and col BL only.
    I have 16,276 rows to result.

    The data starts in col BJ and moves right, if col BK contains data then col BJ will never be blank. If col BL contains data, then cols BJ and BK will never be blank.
    There will be blank cells in all three cols, so result is the same as example.

    The data contains numbers and text only.

    Thanks.
    Attached Files Attached Files
    I am grateful for all answers to my questions .
    Also i give a reputation even if not answered .

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: Macro to conanceate three cols.

    This:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Re: Macro to conanceate three cols.

    Thanks Trevor, I'm having trouble where your results go into my worksheet, can you provide a sample please.
    Thanks.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: Macro to conanceate three cols.

    See the attached updated sample workbook.

    The code is in the module mConcat. There's a very basic version and a more sophisticated version that converts the formulae to values.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    12-12-2017
    Location
    New Zealand
    MS-Off Ver
    Ms Office 2016
    Posts
    450

    Re: Macro to conanceate three cols.

    Perfect, thanks again Trevor.
    I ran the macro over a 214,000 row sheet and with my clunky old computer it processed in less than 3 seconds.
    Just a note for others, I have been using this -, to separate when conanceating. It causes the little green arrow in top left corner of some cells, and they never go away, even when you re-open the sheet.
    I going to use the Asterix from now on. ***.

    Thanks again Trevor.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,457

    Re: Macro to conanceate three cols.

    You're welcome. Thanks for the rep.

    I tend to use a vertical bar ( | ) as a separator for something like this. On advantage of not using a dash ( - ) is that you wouldn't need to keep changing the cell format

+ 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] Macro copy data from cols in Source CSV File into specific Cols in destination file
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-13-2023, 06:07 AM
  2. [SOLVED] Times will not conanceate .
    By I need excel help in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2019, 05:48 PM
  3. [SOLVED] Conanceate this simple function to macro .
    By I need excel help in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2019, 01:23 PM
  4. [SOLVED] Sum columns (duplicates in row header) & delete duplicate cols to leave single unique cols
    By kinrossfarm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2014, 05:50 AM
  5. Range.Select 1st pass 13 cols, 2nd paqss 25 cols twice as wide in error?
    By Craigm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2006, 06:04 AM
  6. [SOLVED] Cond Format:re color 2 cols, skip 2 cols
    By kk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  7. [SOLVED] Cond Format:re color 2 cols, skip 2 cols
    By Tat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2005, 02:05 PM

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