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 Mar 5th, 2002, 09:36 AM   #1
jknichlsn
New Member
 
Join Date: Mar 2002
Location: Chicagoland
Posts: 4
Default

First posting; glad I found this.

If I copy a long list of addresses (say, from the Web) arranged in address blocks, like this:

Jack Nicholson
Big Bank Corp.
123 Fourth Street
Second Floor
Chicago, IL 60603

and want to end up with ALL these addresses in columns (all names in Col A, Company in Col B., etc.), how can I do this? To complicate things, some addresses have more rows in the address block than others; I can work that out by sorting the resulting columns and moving the data, unless someone has something very clever in mind.

Alternatively, does anyone know of a commercial product, faily cheap, that will convert addresses into ACT! contact management software format?

thanks!
jknichlsn is offline   Reply With Quote
Old Mar 5th, 2002, 09:48 AM   #2
AJ
Board Regular
 
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
Default

I had to do the very same thing myself with an output from ACT about a week ago.

The following worked.
Before I started all the addresses were in column A and started in cell A1.
There was also a blank line in between each address and, as in your case, the addresses took up variable numbers of lines.


--
Dim myRow As Integer
Dim myIncrement As Integer


myRow = 2
myIncrement = 1
Range("A1").Select

While ActiveCell.Value <> ""

ActiveCell.Offset(1, 0).Cut
ActiveCell.Offset(0, myIncrement).Select
ActiveSheet.Paste
Rows(myRow & ":" & myRow).Select
Selection.Delete Shift:=xlUp
myIncrement = myIncrement + 1
ActiveCell.Offset(-1, 0).Select
If ActiveCell.Offset(1, 0).Value = "" And ActiveCell.Offset(2, 0).Value <> "" Then
Rows(myRow & ":" & myRow).Select
Selection.Delete Shift:=xlUp
myIncrement = 1
myRow = myRow + 1

End If

Wend
--
As with most of my code, it's probably a bit cumbersome, but seems to do the trick.

Rgds
AJ



AJ is offline   Reply With Quote
Old Mar 6th, 2002, 12:36 PM   #3
jknichlsn
New Member
 
Join Date: Mar 2002
Location: Chicagoland
Posts: 4
Default

wow.

I am quite new to macros, so I don't have any idea how to proceed, but I'm sure I can find someone around here who can take your code and make it do its thing on my lists.

Thank you, VERY much, for taking the time. I really appreciate it.
jknichlsn is offline   Reply With Quote
Old Apr 2nd, 2002, 03:20 PM   #4
jknichlsn
New Member
 
Join Date: Mar 2002
Location: Chicagoland
Posts: 4
Default

Well, I thought it would be easy to find out how to convert your text into something that would actually do something, but no.

Would you be so kind as to reply with something very fundamental, like:

Start with the spreadsheet of your listed addresses opened. Click on "Tools/Macros..." and click on "New Macro" ....'

Your response was like that of a native speaker of a foreign language who replied with a flood to the only phrase I've learned in his language. Thanks very much!!
jknichlsn is offline   Reply With Quote
Old Apr 10th, 2002, 07:10 PM   #5
AJ
Board Regular
 
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
Default

Hello again!

Sorry I've only just noticed your final post to this thread. I don't usually go that far back. (Was just having a final browse before I go for the day).

Anyway, the simple guide to get this to work is as follows:

1. Make a copy of your file incase this totally screws it up!

2. Because I've just given you code above, you need to go directly to the Visual Basic Editor (under Tools>Macros).

3. When you get there, in the project explorer window (usually the box filling the top half of the left side of the screen), right click on your filename and Insert Module

4. At the top of the module type
Sub YourMacroName ()
You'll see this adds End Sub a couple of lines down. Then paste the macro above in between the Sub line and the End Sub line.

5. Back in Excel see if it works...
Tools>Macro>Macros pick YourMacroName and click run.

If it works we're laughing! If it brings up an error message, reply telling me what it is. If it runs all the way through and does not work as you intended, go back to the Visual Basic Editor. Shrink the window a bit so you can see what's going on in Excel at the same time. Put your cursor anywhere in the macro and hit F8 repeatedly to step through it line by line. This will give you a clue as to where it's falling down. Again, reply and me or someone else will fix it!

Rgds
AJ


AJ is offline   Reply With Quote
Old Apr 11th, 2002, 08:57 AM   #6
abe
New Member
 
Join Date: Mar 2002
Location: Boston
Posts: 4
Default

As to ACT.
ACT will import a text delimited file.
The key to success with the import is to ensure that your column headers are identical to the field names in ACT.
You should split your name column into first name and last name columns. Act will merge these two columns into the contact field automatically.
abe is offline   Reply With Quote
Old Apr 11th, 2002, 10:20 AM   #7
jknichlsn
New Member
 
Join Date: Mar 2002
Location: Chicagoland
Posts: 4
Default

AJ: you are the best; thanks very much for taking the time to educate a frustrated banker.

Let me know if I can do anything for youl.
jknichlsn is offline   Reply With Quote
Old Sep 21st, 2002, 09:55 PM   #8
tom
New Member
 
Join Date: Sep 2002
Posts: 10
Default

Thanks guys.
ASAP, I downloaded it, it's not working for this. Seems like it pretty much just does the normal transpose function, correct?

Tom, I tried several times your idea. I don't know why, but it doesn't work. I failed to mention that I only listed 4 records as an example, I really have 500 records to do this to.
tom 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 03:24 PM.


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