+ Reply to Thread
Results 1 to 3 of 3

Replacing Unique Identifier With Dates

  1. #1
    Registered User
    Join Date
    05-18-2022
    Location
    Scotland
    MS-Off Ver
    10
    Posts
    1

    Replacing Unique Identifier With Dates

    Hi

    I have hundreds of spreadsheets where I need to convert numbers to dates. For example, in the photograph, I need to convert number 43 to todays date (18 May 2022). The days count back so number 42 will be yesterdays date (17 May 2022). I have been working on this by using find and replace to replace all the relevant numbers to date but takes a huge amount of time. Is anyone aware of any alternative?

    IMG_1810.jpeg]

    I am having issues attaching my specimen spreadsheet so apologies hopefully the picture will suffice.
    *
    Many thanks

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,343

    Re: Replacing Unique Identifier With Dates

    Are you required to replace the values in column A, or would a helper column with the date be sufficient? I would use a formula like =TODAY()-(43-A4077) in an adjacent empty column, copy/paste/fill the formula up/down as far as needed. Now I have a helper column with the desired date.

    If you decide you must replace the values in column A, it is a simple copy/paste special/as values and number formats operation to overwrite the values in column A with the new dates.

    Will that work for you, or is there some restriction preventing you from adding the helper column?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,475

    Re: Replacing Unique Identifier With Dates

    If you want to overwrite data then you will have to use VBA. Otherwise you are going to need to utilize a helper column.
    I inserted a new column to the right of day. I then utilized a vlookup() function to go after a table i created over in columns O:P.
    I set the table so that 43 = 5/18/2022. You could always use the TODAY() function instead if 43 needs to always equa; whatever the day you are working on its date is. Then i just did a simple =-1 function below so it subtracted one day from the original date. Not sure if this is what you wanted. Like i said earlier though, if you dont want helper columns, and you don't want to continue to use FIND & REPLACE, then you will need to use VBA.
    Attached Files Attached Files
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

+ 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. [SOLVED] sorting rows with unique identifier and then duplicate identifier
    By Roshan.Shakya in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-13-2019, 06:02 AM
  2. [SOLVED] Lookup unique identifier and date in a range of dates to return third value
    By Vesuvius_NLC in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2018, 05:29 PM
  3. Replies: 1
    Last Post: 02-16-2017, 07:53 PM
  4. Lookup unique identifier to see if dates fall within a range
    By avs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2016, 05:25 PM
  5. Replies: 1
    Last Post: 01-29-2015, 04:08 PM
  6. Unique identifier
    By Steve Barnett in forum Excel General
    Replies: 19
    Last Post: 01-06-2006, 07:30 AM
  7. [SOLVED] Unique identifier
    By Steve Barnett in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 01-06-2006, 07:30 AM

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