+ Reply to Thread
Results 1 to 16 of 16

Find Days Remaining with many criteria's

  1. #1
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Find Days Remaining with many criteria's

    Greetings fellow users,



    I an working on a passport and residency renewal sheet , and i started working on a Days remainig Column ,but After Rigorous attempts with the If Function , i am still not able to Rectify it ( I want the Days remaining Column to work according to the Exp date Column and as per the Criteria's mentioned in Column A2 & B2 . can anyone suggest me , where i am going wrong in the If Function Formula in the Days remaining or should i try something else. Thank you

    * Attached is the File For Reference.
    Attached Files Attached Files

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

    Re: Find Days Remaining with many criteria's

    Where you are getting wrong result and what it your expected result for that
    Samba

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

  3. #3
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    Thank You for your reply Siva

    Like whenever the date in EXP Date Column is less than the the date in A2 it should reflect already expired and if more than A2 but less than B2 then show the differences and if the date in Exp date are equal to the dates in the A2 & B2 then it should display expired, if the date in the Exp date column is more than the 2 dates mentioned in the A2 & B2 Then it should display how many days it has to get expired from the Criteria Mentioned in A2 & B2 and if the dates falls between the 2 criteria's then it should take the difference and mention and display how many days are left for it to get expired.
    Last edited by simran555; 02-11-2015 at 12:52 PM.

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

    Re: Find Days Remaining with many criteria's

    e4=IF(D4<A$2,"All Ready Expired",IF(AND(A$2=D4,B$2=D4),"Expired",MIN(D4-A$2,B$2-A$2)))
    try this and copy towards down

  5. #5
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    Thanks for the reply , but it doesnt work . Kindly find the attached file for reference .
    Attached Files Attached Files

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

    Re: Find Days Remaining with many criteria's

    I am not sure
    =IF(D4<A$2,"All Ready Expired",IF(AND(A$2=D4,B$2=D4),"Expired",MAX(0,D4-A$2)))
    Try this
    one more thing to ask you
    What is the use of Until Date in B2 here

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

    Re: Find Days Remaining with many criteria's

    if the above is not works
    tell me the step step logic

  8. #8
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    Thank For your reply

    It works iam getting that 165 days . Now about that until date in B2 , That is to show today until that date( in the B2) how may passports are going to get expired. its Just to show , so we can plan ahead and inform the employee's before time to get it renewed. I hope you got the idea. now in spread sheet i dragged it down its not taking the difference i.e Exp date minus the date in B2 cell( which is 28/02/2015) and the Exp date in one of the columns is 26/02/2015 .
    Last edited by simran555; 02-12-2015 at 01:45 AM.

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

    Re: Find Days Remaining with many criteria's

    What is your expected result in this case

  10. #10
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    Inthis case , my expected result should come - B2 minus the 26/02/2015 - 2 Days , but whats happening in the formula last time given by you it is taking the difference from A2 and its displaying 40 Days which i dont want to see.

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

    Re: Find Days Remaining with many criteria's

    Tell me
    1) if D4 > A2 and D4>B2 What your result would be
    2) if D4 > A2 and D4<B2 What your result would be
    3) if D4 < A3 and D4<B2 What your result would be
    4) if D4 < A3 and D4>B2 What your result would be
    5) if D4 = A3 and D4=B2 What your result would be

  12. #12
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    where should i insert them in IF(AND place ??

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

    Re: Find Days Remaining with many criteria's

    i am asking what is your expected result in the above cases

  14. #14
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    i really dont get it , what can u suggest me to fix this spreadsheet

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

    Re: Find Days Remaining with many criteria's

    In your worksheet
    1) if D4 > A2 and D4>B2 What your answer in E4 (Already expired or expired or B2-A2 or D4-A2 or D4-B4)
    2) if D4 > A2 and D4<B2 What your answer in E4 (Already expired or expired or B2-A2 or D4-A2 or D4-B4)
    3) if D4 < A3 and D4<B2 What your answer in E4 (Already expired or expired or B2-A2 or D4-A2 or D4-B4)
    4) if D4 < A3 and D4>B2 What your answer in E4 (Already expired or expired or B2-A2 or D4-A2 or D4-B4)
    5) if D4 = A3 and D4=B2 What your answer in E4 (Already expired or expired or B2-A2 or D4-A2 or D4-B4)
    if you answer the above i will write the formula

  16. #16
    Forum Contributor
    Join Date
    08-31-2013
    Location
    Kuwait
    MS-Off Ver
    Microsoft office 365
    Posts
    101

    Re: Find Days Remaining with many criteria's

    Hi Thank You for your suggestions

    That formula which given by you to me is actually great - i made some changes in it as per my preference and this was your formula
    - IF(D4<A$2,"All Ready Expired",IF(AND(A$2=D4,B$2=D4),"Expired",MIN(D4-A$2,B$2-A$2)) and i change it to

    IF(D4<A$2,"Already Expired",IF(AND(A$2-D4=0,B$2-D4=0),"Expired",MIN(D4-A$2,ABS(B$2-D4)))) but i am facing a slight problem this Function A$2-D4=0,B$2-D4=0),"Expired" doesn't

    seem to work when i get the value as 0 , it will just display as 0 not expired

+ 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. Calculate how many days remaining between two Dates
    By jordanbuchan359 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2014, 10:42 PM
  2. excel formula: days remaining=end date-todays date+extention days
    By fsprings in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 01-04-2013, 06:45 AM
  3. Calculate remaining # of days between 2 dates
    By Potato2009 in forum Excel General
    Replies: 4
    Last Post: 08-13-2009, 03:21 PM
  4. Replies: 9
    Last Post: 09-03-2007, 08:26 PM
  5. Please Help With Days Elapsed And Days Remaining Calculation
    By Scoooter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-14-2006, 12:15 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