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 6th, 2002, 03:05 PM   #1
mhardy
New Member
 
Join Date: Mar 2002
Posts: 3
Default

I have an xls with a number of values in the format '...X-Y...'. e.g. '...3-6...'. After I execute a search/replace to clean up my data and remove all the dots (.) excel always adds '2002' to these values and converts them to dates. I then lose my original values.

I've specified that all values should be text, but the search/replace seems to ignore this and still make them dates.

Is there any way to turn off excel's automatic date creation and leave my data as is. *So* annoying. I've tried to disable all AutoCorrect crap but still no luck.

Thanks-
Mike
mhardy is offline   Reply With Quote
Old Mar 6th, 2002, 03:17 PM   #2
Barrie Davidson
MrExcel MVP
 
Barrie Davidson's Avatar
 
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
Default

Quote:
On 2002-03-06 14:05, mhardy wrote:
I have an xls with a number of values in the format '...X-Y...'. e.g. '...3-6...'. After I execute a search/replace to clean up my data and remove all the dots (.) excel always adds '2002' to these values and converts them to dates. I then lose my original values.

I've specified that all values should be text, but the search/replace seems to ignore this and still make them dates.

Is there any way to turn off excel's automatic date creation and leave my data as is. *So* annoying. I've tried to disable all AutoCorrect crap but still no luck.

Thanks-
Mike
Make sure your cells are formatted as text before replacing. I'll bet they are currently formatted as General.

Regards,

__________________
Barrie Davidson

"You're only given a little spark of madness. You mustn't lose it." - Robin Williams
Barrie Davidson is offline   Reply With Quote
Old Mar 6th, 2002, 03:53 PM   #3
mhardy
New Member
 
Join Date: Mar 2002
Posts: 3
Default

That's the real kicker. The entire sheet is formatted Text. I've even tried a new sheet with only one cell containing: ...3-6..., formatted as Text, then search/replace '.', with nothing. Replace All, then bang - 3/6/2002. *argh*.

-Mike
mhardy is offline   Reply With Quote
Old Mar 6th, 2002, 03:59 PM   #4
Barrie Davidson
MrExcel MVP
 
Barrie Davidson's Avatar
 
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
Default

Quote:
On 2002-03-06 14:53, mhardy wrote:
That's the real kicker. The entire sheet is formatted Text. I've even tried a new sheet with only one cell containing: ...3-6..., formatted as Text, then search/replace '.', with nothing. Replace All, then bang - 3/6/2002. *argh*.

-Mike
Hmmm....how about a formula approach? In an adjacent column, use the SUBSTITUTE function and then paste that value over your old data. For example,
=SUBSTITUTE(A1,"...","")

This, for sure, will return a string value.

What do you think?


__________________
Barrie Davidson

"You're only given a little spark of madness. You mustn't lose it." - Robin Williams
Barrie Davidson is offline   Reply With Quote
Old Mar 6th, 2002, 04:10 PM   #5
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Use the Data | Text to Columns... menu command.

1. Select a column of your data.
2. Choose the Data | Text to Columns... menu command and specify "Delimited" at Step 1 of 3
3. At Step 2 of 3 check "Other" delimiter, enter "." in the "Other" input field, and check "Treat consecutive delimiters as one"
4. You have now specified 2 columns. At Step 3 of 3 the 1st column should be assigned "Do not import column (Skip)" as its data format and the 2nd should be set to "Text".

That should do it!!

[ This Message was edited by: Mark W. on 2002-03-06 15:31 ]
Mark W. is offline   Reply With Quote
Old Mar 6th, 2002, 04:12 PM   #6
Barrie Davidson
MrExcel MVP
 
Barrie Davidson's Avatar
 
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
Default

Mark, that's way better! Too bad I didn't read the question as posed (haste makes waste).

Regards,

__________________
Barrie Davidson

"You're only given a little spark of madness. You mustn't lose it." - Robin Williams
Barrie Davidson is offline   Reply With Quote
Old Mar 6th, 2002, 04:52 PM   #7
mhardy
New Member
 
Join Date: Mar 2002
Posts: 3
Default

Thanks - that did do the trick. Unfortunately I have 12 pages, 10 columns per page and Text to Column only works 1 column at a time. However, that did spark an idea. I've exported as a .csv, search/replaced all my dots out, then re-imported as Text. A little quicker but I still have to do it 12 times.

Sure seems like a lot of work when search/replace gets me 99% of the way there. I'm surprised there's not a way to turn this 'feature' off.

Thanks for the quick help!
Mike

mhardy 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 07:25 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