You can prefix the cell value with an apostrophe ‘ – this also makes the value into text.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
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
-
89 million Steam account details just got leaked,
by
Alex5723
2 hours, 36 minutes ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
2 hours, 44 minutes ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 hours, 53 minutes ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
3 hours, 26 minutes ago -
Installer program can’t read my registry
by
Peobody
3 hours, 59 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
16 hours, 14 minutes ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
13 hours, 58 minutes ago -
False error message from eMClient
by
WSSebastian42
13 hours, 52 minutes ago -
Awoke to a rebooted Mac (crashed?)
by
rebop2020
22 hours, 57 minutes ago -
Office 2021 Perpetual for Mac
by
rebop2020
1 day ago -
AutoSave is for Microsoft, not for you
by
Will Fastie
8 hours, 23 minutes ago -
Difface : Reconstruction of 3D Human Facial Images from DNA Sequence
by
Alex5723
1 day, 3 hours ago -
Seven things we learned from WhatsApp vs. NSO Group spyware lawsuit
by
Alex5723
4 hours, 43 minutes ago -
Outdated Laptop
by
jdamkeene
1 day, 9 hours ago -
Updating Keepass2Android
by
CBFPD-Chief115
1 day, 14 hours ago -
Another big Microsoft layoff
by
Charlie
1 day, 14 hours ago -
PowerShell to detect NPU – Testers Needed
by
RetiredGeek
17 hours, 37 minutes ago -
May 2025 updates are out
by
Susan Bradley
7 hours, 15 minutes ago -
Windows 11 Insider Preview build 26200.5600 released to DEV
by
joep517
1 day, 20 hours ago -
Windows 11 Insider Preview build 26120.3964 (24H2) released to BETA
by
joep517
1 day, 20 hours ago -
Drivers suggested via Windows Update
by
Tex265
1 day, 20 hours ago -
Thunderbird release notes for 128 esr have disappeared
by
EricB
1 day, 17 hours ago -
CISA mutes own website, shifts routine cyber alerts to X, RSS, email
by
Nibbled To Death By Ducks
2 days, 3 hours ago -
Apple releases 18.5
by
Susan Bradley
1 day, 21 hours ago -
Fedora Linux 40 will go end of life for updates and support on 2025-05-13.
by
Alex5723
2 days, 4 hours ago -
How a new type of AI is helping police skirt facial recognition bans
by
Alex5723
2 days, 5 hours ago -
Windows 7 ISO /Windows 10 ISO
by
ECWS
13 hours, 35 minutes ago -
No HP software folders
by
fpefpe
2 days, 12 hours ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
1 day, 10 hours ago -
Stay connected anywhere
by
Peter Deegan
2 days, 18 hours 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.