Excel Quick Concatenate across Multiple Cells | VBA Macro #73

Macro Intro

The Concatenate function in Excel is powerful in that it can create unique identifiers to help you sort and better understand your dataset. One issue with the Concatenate function is when you want to join many columns together in Excel. Setting up a Concatenate formula across 10 or more cells becomes an opportunity to pick your pain either doing a lot of typing or clicking. You can use the TextJoin function in Excel which is designed to handle concatenation across a range of cells. If you want to avoid typing a formula in Excel, then checkout Leverage & Lean’s Excel Quick Concatenate across Multiple Cells macro! This Excel macro will look at all columns in the Active Worksheet that are available to concatenate. An InputBox then displays asking for an specific value to separate each column from each other (Example: “ “, “-“, “_”, etc.) A NEW column is created and appended to the last column in the Active Worksheet. The Excel macro then loop throw all rows in the Active Worksheet concatenating the appropriate column values and entering them into the NEW concatenate column. Once you see this Excel Quick Concatenate across Multiple Cells macro run you will never want to enter a formula to do this again! If you are looking to target specific column values that you want to concatenate then take a look at our Insider version of this macro.

See it in Action

Watch this video to see this macro in action.

***Video coming soon!***

Code

Here is the code for this macro. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Excel 16.0 Object Library

Insider Content

Here is the Insider code for this macro. The Insider version of the Excel Quick Concatenate across Multiple Cells macro allows you to select the columns you want to concatenate. You can use Ctrl or Shift to select specific columns. Keep in mind this macro will remember which column you select first using that as the first value to start the concatenated cell. Make sure the following References are setup before running it: Visual Basic For Applications, Microsoft Excel 16.0 Object Library

Search

First time using VBA?

The Developer Tab is an additional section of the ribbon when activated allows you access to Visual Basic in Applications like Access, Excel, Outlook, PowerPoint, Word.
Setup Now
Once the Developer Tab is available you will have the capability to update your security to allow Macros to run in the current application.
Setup Now
A sub of code is a collection of objects and variables. For the code to successfully run a library of references needs to be set.
Setup Now
Subscribe as an Insider to receive additional rights.
If you like our content and want to show your support tip us here!

Contact Us

Looking to improve your computer processes?
Leverage & Lean is here to help!

Powered By MemberPress WooCommerce Plus Integration

Free Macro

Start creating Less Clicks, More Results today!