+ Reply to Thread
Results 1 to 5 of 5

Excel formula from looking the base date and convert into desire result

  1. #1
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Excel formula from looking the base date and convert into desire result

    I have an excel file.I want to solve the category condition from an excel formula.In this file,G3 will be my base date and I want the excel formula in colum no.I i.e.Category.For this,look the base date i.e.G3 and compare to column F i.e.Date Column of each material code.
    For more clarification,please refer the attach file
    Attached Files Attached Files
    Regards


    Pradeep Kumar Gupta
    Gurgaon ( INDIA )

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Excel formula from looking the base date and convert into desire result

    See the green cells.

    I divided by 365.

    This can give you an wrong answer is there are years with 366 days and you want an exact match (on a date) e.g. 31.01-2008 - 31.01.2013.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel formula from looking the base date and convert into desire result

    There is a problem with the dates that you are using in that they are not in a format that is recognized by Excel. Change the dates to an Excel acceptable date format then date formulae will work.

    After changing the dates to acceptable date formats enter this formula in I5 and copy down the column.

    =IF(DATEDIF(F5,$G$3,"Y")>4,">4 Years",IF(DATEDIF(F5,$G$3,"Y")>=3,">3 Years <4 Years",IF(DATEDIF(F5,$G$3,"Y")>=2,">2 Years <3 Years",IF(DATEDIF(F5,$G$3,"Y")>=1,">1 Year <2 Years",IF(DATEDIF(F5,$G$3,"Y")<1,"<1 Year","")))))

  4. #4
    Forum Contributor PRADEEPB270's Avatar
    Join Date
    02-19-2010
    Location
    INDIA
    MS-Off Ver
    MSoffice-2016
    Posts
    332

    Re: Excel formula from looking the base date and convert into desire result

    Thank you sir for your nice formula provide to me.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Excel formula from looking the base date and convert into desire result

    Your dates are not in correct format. If possible, changing the format would better for shortern the formula.
    Anyway, if impossible, try this without changing the format:
    Please Login or Register  to view this content.
    Quang PT

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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