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

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,633
Messages
5,832,780
Members
430,167
Latest member
Gogogoben

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
Top