+ Reply to Thread
Results 1 to 3 of 3

Entering two dates in a single cell and retaining the date format

  1. #1
    Registered User
    Join Date
    02-16-2021
    Location
    Delhi, India
    MS-Off Ver
    2007
    Posts
    1

    Exclamation Entering two dates in a single cell and retaining the date format

    I want to fill in two dates inside a cell and still retain the date / time / number format of the particular data. For example instead of writing "02 Feb 21 to 12 Feb 21", can i get the result as "02-Feb-21 (to) 12-Feb-21". So that in future i can sort the date bases on first or last dates.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: Entering two dates in a single cell and retaining the date format

    Welcome to the forum.

    In a word, no. You will need helper columns with single dates if you wish to sort on dates.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Entering two dates in a single cell and retaining the date format

    It is almost always better to keep 1 specific piece of data in a cell, rather than combining different data types.

    A date is numeric, but ANY time you add text to a cell, no matter what else is in that cell - even numbers - that cell format becomes text.

    So if you have dates, put 1 date in 1 cell,, and the other date in another cell.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Replies: 1
    Last Post: 01-16-2018, 02:28 AM
  2. Force Cell format as General when entering in a date.
    By Miskondukt in forum Excel General
    Replies: 2
    Last Post: 12-03-2015, 03:46 PM
  3. [SOLVED] Retaining date format when pasting to Notepad (from Excel)
    By blondeambition in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-03-2015, 06:16 PM
  4. Copying UK Dates from google spreadsheets and pasting into excel, retaining UK Format
    By notreallyIT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2013, 11:55 AM
  5. [SOLVED] Date Filter based on Cell Input - single date or range of dates
    By babaloo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2012, 10:32 AM
  6. Dates in 2005 format cells are not entering correctly.
    By snixflowergirl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2005, 02:06 PM

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