+ Reply to Thread
Results 1 to 10 of 10

Date issue format

  1. #1
    Registered User
    Join Date
    01-06-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    11

    Date issue format

    Hello Everyone,

    I am having troubles converting excel cells into a year format.
    Can someone please help? I have attached the file.
    Basically, I am trying to get the "year" (date format) for the year of incorporation but unfortunately it seems like column A has two types of format.

    Thanks in advance for your help!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Date issue format

    You have to write the full date in the first column, otherwise there is no sense for the YEAR formula. Also The YEAR formula column has to be in GENERAL format. See attached file.
    Attached Files Attached Files

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Date issue format

    =IF(A2*1<=2020,A2,YEAR(A2))
    Try this formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    01-06-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Date issue format

    Column A comes from a database (download) so I can't manually change the dates. My download has 10K+ dates ...

  5. #5
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Date issue format

    try below

    Please Login or Register  to view this content.
    Regards,
    Nandkumar S.
    ---------------------------------------------------------------
    Don't forget to Click on * if you like my solution.

  6. #6
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: Date issue format

    Hi,
    try this in b2
    =IF(CELL("format",A2)="G",VALUE(A2),YEAR(A2))

    Punnam

  7. #7
    Registered User
    Join Date
    01-06-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Date issue format

    Siva: it works! Thanks a million!

  8. #8
    Registered User
    Join Date
    01-06-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Date issue format

    All the formulas (3) work. Thanks so much for your help. Much appreciated!

  9. #9
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Date issue format

    Got the answer ..
    Custom formatting is the solution..

    Select the range..
    Right click, and select Format Cells and click Custom and type yyyy

    Don't forget to click *
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-06-2009
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    11

    Re: Date issue format

    Thanks Siva. I think the formula works better because when you subtract two date fields, you get the correct number of years.
    Try to subtract two "date" cells based on your latest answer (format change only) and you get huge numbers.

+ 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] Issue with date format when comparing two date values (I'm in Australia)
    By aaron.irvine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2013, 01:13 AM
  2. Date format issue
    By skhari in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2012, 02:08 AM
  3. [SOLVED] Date Format Issue
    By eramosjr1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-07-2012, 11:02 AM
  4. Date Format Issue
    By dsol828 in forum Excel General
    Replies: 3
    Last Post: 11-22-2010, 03:42 PM
  5. Date format issue
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2010, 08:31 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