Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8353315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:13:10+00:00 2026-06-09T09:13:10+00:00

We have a lot of automated spreadsheets that extract data, calculate forecasts, publish web

  • 0

We have a lot of automated spreadsheets that extract data, calculate forecasts, publish web pages, etc. It’s a really messy system, and I’d love to redo it (with, say, a real web service), but we don’t have permission to do that.

We run Excel 2007, with most of the spreadsheets converted to .xlsms.

Anyway, for some reason unknown to me, certain spreadsheets will format certain numeric cells as dates at seemingly random times. As you might imagine, the problem is difficult to track down, and usually I only find out when someone has written a nasty email about our data reading 3-Feb-1901 when it should read 400 (apparently Excel thinks there was a leap year in 1900).

I’ve explicitly set the cells in question to numeric format several times, only to find them filled with dates a week later.

I’ve scanned the macros (many are in the ancient Excel 4.0 macro language), they appear to be clean of any formatting changes. All copy/pastes are done as values and do not preserve source cell formatting.

There are no conditional formatting rules in the sheets in question.

Adding a little VBA to format the cells as desired in the Auto_Open subroutine appears to work around the issue.

Is this fix good enough, or in a week will I find the date format is appearing mid-calculation? If not, what is the root cause and how I can fix it?

One thing: I just read from this source that Excel ’07 may spontaneously change Normal-styled cells to the format [$-409]m/d/yy h:mm AM/PM;@. Some of my cells that have changed were definitely styled Normal, but evidently not all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:13:13+00:00Added an answer on June 9, 2026 at 9:13 am

    I’m assuming the cells in question are the receipients of copied/pasted data, or external/queried data?

    Whenever you add pasted data to a cell in excel, it runs througha routine to determine the best format for anything that’s listed as “general” format, even if the source is “general” or “number”. Sometimes even setting the destination cells to “number” format does not clear up this issue. But I’ve found the only way to to get this to work the way you need it to is to explicitly declare the format (in the macro) to the destination range in question before the paste/update/refresh operation.

    I also think there’s a way to disable date recognition within your VBA, but I can’t remember the exact code. Try recording a macro while doing manually importing or performing your update and you should be able to use what comes up.

    Edit: just did a test run, and after your connection string and destination add:

    .WebDisableDateRecognition = True
    

    That should definitely do the trick if you’re pulling data in from an external source and not copy/pasting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a lot of pages that are setup like so from an old
I have lot of code in my Tornado app which looks like this: @tornado.web.asynchronous
I am creating Excel file download using NOPI libraries. I have lot of data
I am trying to build a data mart. I have lot of dimensions, and
I have a lot of C# code that uses public fields, and I would
I have been looking around stackoverflow for automated GUI tools for testing our web
I have a unique set of processes that all need to be automated. We
I have a lot of the following type of code (each gets data from
We have a massive, ancient codebase that needs a lot of cleanup. We have
I have lot of products with custom options, now I have requirement to update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.