+ Reply to Thread
Results 1 to 5 of 5

Refreshing/Recalculating dates in spreadsheet

  1. #1
    Registered User
    Join Date
    02-27-2017
    Location
    England, UK
    MS-Off Ver
    2013
    Posts
    3

    Refreshing/Recalculating dates in spreadsheet

    Right, I've tried to find solution for days now, without any success, so I hope there's some guru in here who already encountered that problem and will be kind enough to provide a solution.
    So, long story short:
    I have three columns, in first there's date in unusable format (22.02.2017/13:23:19), in second there's formula to extract actual date "=LEFT($E3;(LEN($E3)-(LEN($E3)-FIND("/";$E3))-1))" and then I copy second column, and paste it 'as values' to the third one. All cells in third column are formatted as date, tried in every possible combination. And the thing is, excel doesn't see the third column as a date, until I enter every cell, and press enter, even without any change to the data in this cell. That also works with ctrl+h 'find and replace' tool - I just put there find '.' replace with '.' (so again, no change at all) and all cells will 'refresh' and excel will recognize values in them as dates.
    The actual problem is, that now when I got tired of doing same stuff over and over again, I've made macro for it...and it doesn't work. I mean it works, so it replace what I want it to replace, but it somehow lost the 'refresh ability', so excel still doesn't recognize values as dates, unless I do that manually.

    Does anyone have a solution, how can I make excel to recalculate/refresh/whatever those cells so it'll see them as dates?

    Thanks,
    FFLORO

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Refreshing/Recalculating dates in spreadsheet

    I presume you are using a non-English version of Excel, as you show semicolons in your formula rather than commas. You can use this formula to derive the date:

    =DATE(MID($E3;7;4);MID($E3;4,2);LEFT($E3;2))

    and apply an appropriate format to that cell, then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-27-2017
    Location
    England, UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Refreshing/Recalculating dates in spreadsheet

    That depends, I use English version most of the time, but when I'm working with Rexroth controllers (German company) I change regional settings to Germany - makes it much easier than importing data from .csv files.
    Anyway, regarding your formula - it's something I didn't know even exists, it's much more efficient. I get a notification though, that I've entered too few arguments for this function - not a clue why, but I've changed semicolons to commas, regional settings back to UK and it runs exactly as I need it to, thanks! :D

    However, just for future reference - formula above solves that particular problem with dates, not really the one with non-refreshing cells. Any ideas about that?

    FFLORO

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Refreshing/Recalculating dates in spreadsheet

    The LEFT function that you had in your formula would return a text value, although it might look like a date. When you fixed the values it would still be a text value. When you edited a cell or did Find & Replace, then Excel would try to make sense of the value and would conclude that it should be a date, and so would make the necessary adjustments. You could achieve the same by doing this to your formula:

    =LEFT($E3;(LEN($E3)-(LEN($E3)-FIND("/";$E3))-1)) +0

    If you do some simple arithmetic on a text value, like add zero or multiply by 1, then you can get Excel to coerce the value to a numeric value (if it makes sense to interpret it as such).

    Hope this helps.

    Pete

    P.S. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post and mark this thread as SOLVED.
    Last edited by Pete_UK; 02-27-2017 at 01:11 PM.

  5. #5
    Registered User
    Join Date
    02-27-2017
    Location
    England, UK
    MS-Off Ver
    2013
    Posts
    3

    Re: Refreshing/Recalculating dates in spreadsheet

    Pete,

    I'll mark it as solved, as I don't really have a problem anymore. However, you've explained how excel works with those cells (which I appreciate, it'll make easier to solve future problems without using forums ) but the original question still stands - if by using Find & Replace function I forced Excel to try to make sense of the value in the cell, how can I force it to do so within a macro? That tool didn't work there anymore, and I can't find any way to do so except manually entering cells.

    Cheers,
    FFLORO

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Data from custom function not refreshing automatically in spreadsheet
    By jprealini in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2014, 05:15 PM
  2. Excel Spreadsheet NOT Refreshing
    By zyzzyva57 in forum Excel General
    Replies: 6
    Last Post: 02-19-2014, 07:51 PM
  3. [SOLVED] Refreshing/Recalculating Sheets based on user input or switching between sheets
    By SonOfOdin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 09:48 PM
  4. Big problem with excel recalculating spreadsheet
    By Prometheus in forum Excel General
    Replies: 2
    Last Post: 08-09-2006, 02:50 PM
  5. [SOLVED] Non Refreshing/Recalculating Cell ??
    By J in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2006, 04:50 AM
  6. Odd behavior...recalculating, refreshing?
    By M. Authement in forum Excel General
    Replies: 2
    Last Post: 02-16-2006, 08:25 AM
  7. [SOLVED] Recalculating a very large spreadsheet
    By Chris Lo in forum Excel General
    Replies: 0
    Last Post: 11-16-2005, 06:55 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1