concatenate data elements (columns) to text string

dalerguy

Board Regular
Joined
Mar 2, 2005
Messages
51
Hello all,

I have a spreadsheet in this format. Column headings are form elements. I need to get this file into a text string for an upload process.

name email street city state
Person1 person1@home.com Main Toronto ON
person2 person2@home.com Old Halifax NS
person3 person3@home.com Somewhere Ottawa ON

I want to create a .txt file in this format with "&" as between data element separators.

name=Person1&email=person1@home.com&street=Main&city=Toronto&state=ON
name=Person2&email=person2@home.com&street=Old&city=Halifax&state=NS
name=Person3&email=person3@home.com&street=Somewhere&city=Ottawa&state=ON

Is this kind of thing possible.

Thanks,
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Do you mean you want to convert those 5 cells into one string?

Try:

="name="&A2&"&email="&B2&"&street="&C2&"&city="&D2&"&state="&E2

where your info begins in A2. Adjust if necessary, then copy down.
 
Upvote 0

Forum statistics

Threads
1,216,415
Messages
6,130,482
Members
449,584
Latest member
LeChuck

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