MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 16th, 2002, 01:09 PM   #1
grayphantom
New Member
 
Join Date: May 2002
Posts: 1
Default

I need help I have created a spreadsheet for address, but now i need to put all the data into one cell. So it would appear like a normal address. Can I concatenate more than two cell and have the text wrap around.
grayphantom is offline   Reply With Quote
Old May 16th, 2002, 01:24 PM   #2
jkpd2000
Board Regular
 
Join Date: May 2002
Posts: 91
Default

try this ...
=concatenate(a1," ",a2," ",a3)

first time posting a solution

[ This Message was edited by: jkpd2000 on 2002-05-21 08:52 ]
jkpd2000 is offline   Reply With Quote
Old May 16th, 2002, 01:25 PM   #3
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

If you've got Word, you can easily try mailmerging to labels.

http://www.thewordexpert.com/word.htm#MailMerge
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old May 16th, 2002, 01:27 PM   #4
klb
Board Regular
 
Join Date: Apr 2002
Location: Minnesota
Posts: 821
Default

Can you export data to Access? Mailing label wizard can do this for you without blinking an eye.
__________________
Curiosity may have killed the cat but...
satisfaction brought it back. >^;^<
klb is offline   Reply With Quote
Old May 16th, 2002, 01:41 PM   #5
cornbread
Board Regular
 
Join Date: Apr 2002
Location: Oregon
Posts: 77
Default

I deal with address stuff like that every day. Put this in a module and run it as a macro.




Sub concatenate1()
Range("a1").Select
Do while Not IsEmpty(ActiveCell.offset(0,-4))
ActiveCell = Activecell.Offset(0,-4) & " " & Activecell.Offset(0,-3) & " " & Activecell.Offset(0,-2) & " " & Activecell.Offset(0,-1)
ActiveCell.Offset(1,0).Select
Loop
end sub




"a1" fill in "a1" in the sub with the first cell to the right of the first four separate address cells I.E. "E1" if your first row has the first address parts on it. I have some cool ones for stripping zip codes out of longer strings of numbers if you ever need them too.



[ This Message was edited by: cornbread on 2002-05-16 13:18 ]
cornbread is offline   Reply With Quote
Old May 16th, 2002, 01:52 PM   #6
cornbread
Board Regular
 
Join Date: Apr 2002
Location: Oregon
Posts: 77
Default

There it's all on one line now. Thanks to NateO

[ This Message was edited by: cornbread on 2002-05-16 13:16 ]
cornbread is offline   Reply With Quote
Old May 17th, 2002, 05:56 AM   #7
klb
Board Regular
 
Join Date: Apr 2002
Location: Minnesota
Posts: 821
Default

But how do you get the text to wrap so it looks like a mailing address like Grayphantom asked?
__________________
Curiosity may have killed the cat but...
satisfaction brought it back. >^;^<
klb is offline   Reply With Quote
Old May 17th, 2002, 05:58 AM   #8
gareth
Board Regular
 
Join Date: Apr 2002
Location: Cape Town,South Africa
Posts: 234
Default

Or

You could even try this one

=A1 & A2 & A3 & A4


__________________
Regards
Gareth
Visit The Excel Maniacs :<>: Have a Chat! :<>: Free Stuff!
gareth is offline   Reply With Quote
Old May 17th, 2002, 06:22 AM   #9
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Quote:
On 2002-05-17 04:56, klb wrote:
But how do you get the text to wrap so it looks like a mailing address like Grayphantom asked?
Hi,

Following on Cornbread response, you can use Chr(10) to insert a carriage return in the cell.

Code:
Sub test()
Dim x, msg

With ActiveCell
    For x = -4 To -2
        msg = msg & .Offset(0, x) & Chr(10)
    Next x
    msg = msg & .Offset(0, -1)
    .Value = msg
End With
End Sub
This puts Cornbread's routine in a loop. As Cornbread noted, if A1:D1 contain the address data, activate cell E1 and run the routine.

Bye,
Jay

[ This Message was edited by: Jay Petrulis on 2002-05-17 05:25 ]
Jay Petrulis is offline   Reply With Quote
Old May 17th, 2002, 06:58 AM   #10
klb
Board Regular
 
Join Date: Apr 2002
Location: Minnesota
Posts: 821
Default

Thank you Jay

From a satisfied cat>^;^<
klb is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes