Merge Cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guest
HI
I changed the datatype to Text for the whole spreadsheet but when I try to merge any cells I get the error 'different data types'

What I have is about 6 fields which contain address details
as some of the addresses are shorter that onthers I have gaps
for example one address could be
add1 add2 add3 add4 add5 zip
with all fields populated
another address could be
add1 add2 add3 add4 add5 zip
with add5 left blank
and some addresses would have different fields missing

I dont want to merger all the fields in to one, I just want the details in HI
I changed the datatype to Text for the whole spreadsheet but when I try to merge any cells I get the error 'different data types'

What I have is about 6 fields which contain address details
as some of the addresses are shorter that onthers I have gaps
for example one address could be
add1 add2 add3 add4 add5 zip
with all fields populated
another address could be
add1 add2 add3 add4 add5 zip
with add5 left blank
and some addresses would have different fields missing

I dont want to merger all the fields in to one, I just want the details in cosecutive fields.

I tried merging cells but it didnt work so is there any maco/piece of code I can use to do this?

Thanks in fields.

I tried merging cells but it didnt work so is there any maco/piece of code I can use to do this?

Thanks in advance
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
You don't have to change the data type at all.

Lets say that you have

add1 add2 add3 add4 add5 zip

in A2:F2

In G2 enter:

=A2&" "&B2&" "&C2&" "&D2&" "&E2&" "&F2

will cocatenate ("merge") into a single field.
 
Upvote 0
Thats Cool
but not exactly what I wanterd to do

first adress
add1 add2 add3 add4 add5 add6
Myhouse 10 East Rd Eastly York 123

second address
add1 add2 add3 add4 add5 add6
20 West Rd York 123

I want the layot as the first address
but the second I dont want empty ceels, I want the data to be empty
I want it to look like

first adress
add1 add2 add3 add4 add5 add6
Myhouse 10 East Rd Eastly York 123

second address
add1 add2 add3 add4 add5 add6
20 West Rd York 123


is there a way of doing this without manually changing every record

thanks again
 
Upvote 0
On 2002-03-03 03:22, Tap wrote:
Thats Cool
but not exactly what I wanterd to do

first adress
add1 add2 add3 add4 add5 add6
Myhouse 10 East Rd Eastly York 123

second address
add1 add2 add3 add4 add5 add6
20 West Rd York 123

I want the layot as the first address
but the second I dont want empty ceels, I want the data to be empty
I want it to look like

first adress
add1 add2 add3 add4 add5 add6
Myhouse 10 East Rd Eastly York 123

second address
add1 add2 add3 add4 add5 add6
20 West Rd York 123


is there a way of doing this without manually changing every record

thanks again

=IF(LEN(A2),A2&" ","")&IF(LEN(B2),B2&" ","")&IF(LEN(C2),C2&" ","")&IF(LEN(D2),D2&" ","")&IF(LEN(E2),E2&" ","")&IF(LEN(F2),F2,"")
This message was edited by Aladin Akyurek on 2002-03-03 03:28
 
Upvote 0

Forum statistics

Threads
1,223,360
Messages
6,171,630
Members
452,411
Latest member
sprichwort

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