You can prefix the cell value with an apostrophe ‘ – this also makes the value into text.
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Preventing Autoformat (Excel 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Preventing Autoformat (Excel 2000)
- This topic has 15 replies, 5 voices, and was last updated 20 years, 2 months ago.
Viewing 4 reply threadsAuthorReplies-
WSSultanofCyber
AskWoody Lounger -
WSSultanofCyber
AskWoody Lounger -
WSSultanofCyber
AskWoody LoungerAugust 11, 2004 at 4:43 pm #862983When a user enters data such as a part number that contains the dash, for example 12-3366, in a cell Excel automatically changes this to a date.
I can get around it temporarily by formatting the whole column as text but anytime a search and replace is done it reverts any changed to a date again. Help!! -
WSSultanofCyber
AskWoody LoungerAugust 11, 2004 at 4:43 pm #862984When a user enters data such as a part number that contains the dash, for example 12-3366, in a cell Excel automatically changes this to a date.
I can get around it temporarily by formatting the whole column as text but anytime a search and replace is done it reverts any changed to a date again. Help!! -
WSAlanMiller
AskWoody LoungerMarch 19, 2005 at 3:22 am #935874 -
WSsdckapr
AskWoody Lounger -
WSAlanMiller
AskWoody LoungerMarch 19, 2005 at 10:07 am #935897The specific situation I’m trying to deal with involves the generation of a new sheet, based on a skeleton sheet. The latter contains data like Jan-xx, Feb-xx, … and the xx values are determined for the new sheet from the year that the user inputs. For instance, if the new sheet was for 1985, those skeleton entries would appear as Jan-85, Feb-85 etc. on the new sheet.
Using Hans’s apostrophe method gives the correct result, but without it, everything goes awry on both the skeleton (which is only copied from, not written to) as well as the newly created sheet.
Alan
-
WSsdckapr
AskWoody LoungerMarch 19, 2005 at 10:16 am #935899When they are they are entered manually or via code it needs the prefix (‘) character.
How exactly are things being entered that it causes problems? There could be alternate entry means:
If they are specific cells, you could format as text before entry, then they will be text.You could enter only a portion of the string (or in multiple places) and use a formula to combine them.
I don’t understand your “setup”
Steve
-
WSAlanMiller
AskWoody LoungerMarch 19, 2005 at 12:14 pm #935909Each new sheet represents all of the accounting facets/ tables for a particular calendar year, specified as say, 2008. The whole thing is done in VBA, fired from the NewSheet event. The skeleton worksheet is copied to the new sheet, then a few search & replaces change “YYYY” to “2008”, “yy” to “08” and “xx” to 08-1=07. All this works OK now, using the apostrophe method in the skeleton sheet e.g. Jul-yy will correctly become Jul-08, 31/12/yy will become 31/12/08, “Report for YYYY” will become “Report for 2008”.
My concern arises from the more general situation of users inserting their own dates (intended as Text) in non-specific areas of the sheet – the skeleton copy is not the whole story. I suppose I could format the whole thing as Text, then reformat the known cells as currency, number etc. but I was hoping for an easier/ alternative way.
Alan
-
WSsdckapr
AskWoody LoungerMarch 19, 2005 at 12:41 pm #935910Your “problem” is the user and allowing them to insert dates that should be text – perhaps education/training will help…
Maybe only allowing entry into particular cells…
Search/replace can become an issue, since it will most times, treat it like a “re-edit/re-entry” and interpret/translate the new item…
Perhaps created named formulas for “yyyy”, “yy”, “xx” and use the named formulas in formulas. Then all you have to do is change what the names “refers to” to update them…Steve
-
WSAlanMiller
AskWoody LoungerMarch 19, 2005 at 1:51 pm #935918That sounds like a good idea. I’ve not used names for formulas before. Something like this I guess:
Names.Add Name:=”YYYY”, RefersTo:=”=UserInputValue”
Names.Add Name:=”ZZZZ”, RefersTo:=”=UserInputValue+1″
Names.Add Name:=”xx”, RefersTo:=”=Right(UserInputValue-1, 2)” etc.where user has supplied (validated) UserInputValue through an InputBox.
As you say, it’s a user issue in the very end, and unfortunately it ain’t my workbook to rule. I think a lot of freeform text might end up going in, from a number of users who pass it round… all out of my hands. I’ll have a fiddle with your idea. Thanks Steve.
Alan
-
WSsdckapr
AskWoody LoungerMarch 19, 2005 at 3:44 pm #935933 -
WSAlanMiller
AskWoody LoungerMarch 20, 2005 at 1:20 am #935991
You can have the inputbox code do some validation, and then have it put the results in the name.
That’s what I was alluding to when I said “user has supplied (validated) UserInputValue through an InputBox”. This seems to work well (so far) for this project, where an added sheet might be for an annual report, or something totally unrelated. I validate according to the sheet name they enter e.g. “2008” would be a report based on the skeleton.
Good thought setting the visible property to false too.
cheers
Alan
-
-
-
-
WSpieterse
AskWoody Lounger -
WSAlanMiller
AskWoody LoungerMarch 20, 2005 at 12:19 am #935993Thanks Jan. I thought of this in post 462783: “I suppose I could format the whole thing as Text, then reformat the known cells as currency, number etc. but I was hoping for an easier/ alternative way.”
I guess an easier way might be to start with a blank sheet, formatted entirely as text, then “manually” copy/ paste all of my non-blank cells across. That doesn’t sound too bad. I think it’s the user’s problem to do the reformatting as required, and I imagine most of the user additions will be intended as text anyway. I doubt they’ll be adding much/ anything that leans towards calculation.
cheers
Alan
-
-
Viewing 4 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Office gets current release
by
Susan Bradley
2 hours, 1 minute ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
14 hours, 16 minutes ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
2 hours, 16 minutes ago -
Stop the OneDrive defaults
by
CWBillow
15 hours, 5 minutes ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
1 day, 1 hour ago -
X Suspends Encrypted DMs
by
Alex5723
1 day, 3 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
1 day, 3 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
1 day, 4 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
1 day, 4 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
16 hours, 55 minutes ago -
Enabling Secureboot
by
ITguy
23 hours, 54 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
1 day, 12 hours ago -
No more rounded corners??
by
CWBillow
1 day, 8 hours ago -
Android 15 and IPV6
by
Win7and10
22 hours, 13 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
2 days, 1 hour ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
2 days, 3 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
1 day, 22 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
2 days, 11 hours ago -
May preview updates
by
Susan Bradley
1 day, 22 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
1 day, 13 hours ago -
Just got this pop-up page while browsing
by
Alex5723
2 days, 3 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
2 days ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
1 day, 2 hours ago -
At last – installation of 24H2
by
Botswana12
3 days, 2 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
16 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
3 days, 14 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
1 day, 13 hours ago -
Limited account permission error related to Windows Update
by
gtd12345
4 days, 4 hours ago -
Another test post
by
gtd12345
4 days, 4 hours ago -
Connect to someone else computer
by
wadeer
5 hours, 36 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.