Consulting

Results 1 to 2 of 2

Thread: Replacing a Date Extracted From a String

  1. #1
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location

    Replacing a Date Extracted From a String

    The values "8/12/2018" and "8/13/2018" are substrings within two separate longer text strings, STRING1 and STRING2 respectively. I can easily extract those dates and compare them. Is it possible to use the REPLACE function to replace the older date in STRING1 with the more recent extracted date from STRING2?

  2. #2
    VBAX Expert
    Joined
    Feb 2010
    Posts
    696
    Location
    I think I may have solved my dilemma. It appears that dimming the substrings as dates was preventing the REPLACE and SUBSTITUTE functions from performing the desired replacement. Dimming the substrings as strings seems to work.

Posting Permissions

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