Taking multiple rows and bringing them to one row VBA

burnsa9

New Member
Joined
Jul 20, 2017
Messages
11
I am trying to take multiple rows and bring them to one row. for example I am trying to take address, City, State, and country and bring them to one column that has them all read. I cant use a concatnation excel formula becasue I need there to be spaces between address city state and country. An example of what my data looks like is below along with what I want my output to looklike after running the VBA. I have tried running the excel formula = A2&B2&C2&D2 however this doesn't allow for approprate spacing.
Address
City
State
Counrty
Combined (Output I am looking for)
240 new Byhalia Rd
Memphis
Tennessee
United States
240 new Byhalia Rd Memphis Tennesse

<tbody>
</tbody>
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You can manually enter a space between each cell in the formula.

Try:


Excel 2013/2016
ABCDE
1AddressCityStateCounrtyCombined (Output I am looking for)
2240 new Byhalia RdMemphisTennesseeUnited States240 new Byhalia Rd Memphis Tennessee United States
Sheet2
Cell Formulas
RangeFormula
E2=A2&" "&B2&" "&C2&" "&D2
 
Upvote 0
You can also add spaces by sticking in =A1&" "&B1&" "&C1&" "&D1 or whre you looking for some other format?
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,777
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top