+ Reply to Thread
Results 1 to 12 of 12

Formula to show a Number 1 or 0 based on dates and numbers.

  1. #1
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Formula to show a Number 1 or 0 based on dates and numbers.

    Hi All,

    I've been unsuccessful creating a formula to show a "1" if True and "0" if False. In cell M39 (Carry/No Carry).

    I would like to show a "1" if cells F18, F39 have a "1" AND the dates in cells G24, L39, H51, H53, & H55 Dates are <= Today().

    Thank you.

    V/r,
    Jim
    Attached Files Attached Files

  2. #2
    Forum Expert Crooza's Avatar
    Join Date
    10-19-2013
    Location
    Hunter Valley, Australia
    MS-Off Ver
    Excel 2003 /7/10
    Posts
    2,082

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Try this

    Please Login or Register  to view this content.
    Happy with my advice? Click on the * reputation button below

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Plaese try
    =(F18*F39=1)*(max(G24,L39,H51,H53,H55)<= Today())

  4. #4
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Bo_RY,

    Thank you. Your solution was closest to working best. I ended up modifying it to this:

    Please Login or Register  to view this content.
    But I realized I get a False "1" even when some cells are blank.

    Is there a way to modify the formula to compensate?

    V/r,
    Jim
    Last edited by sorensjp; 08-26-2020 at 03:58 AM.

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

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    =(F18=1)*(F39=1)*(Max(G24,L39,H51,H53,H55)< =TODAY())

    keep F18 & F39 separated to avoid 2 *1/2 = 1
    Quang PT

  6. #6
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    bebo021999,

    I did make the adjustment and your solution does address the cells containing "1" or "0" separately.

    Please Login or Register  to view this content.
    But is there a way of checking for Blanks in the Cells (G24,L39,H51,H53,H55).

    I'm so bad with formulas. It seems I'm logical enough.

    V/r,
    Jim

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

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    What would you expect the result to be if any of them blank?

  8. #8
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    bebo021999,

    I would like the cell to show "0". Basically all cells in the formula need to be True. So if any blanks would make Cell M39 = "0".

    Thank you for asking.

    V/r,
    Jim

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    If you intent to input decimal in F18 and F39 (F18=1)*(F39=1) is a good precaution.
    But I can see you use DV at F18 and F39 to -1, 0 ,1 so (F18*F39=1) is enough.


    AND the dates in cells G24, L39, H51, H53, & H55 Dates are <= Today()
    mean all date must be less than Today


    Your formula
    (MIN(G24,L39,H51,H53,H55)>=TODAY())
    mean all date must be more than today

    To check blank date

    =(F18*F39=1)*(MIN(+G24,+L39,+H51,+H53,+H55)>= TODAY())

  10. #10
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Bo_Ry,

    Does it make a difference if the cells (G24,L39,H51,H53,H55) contains formulas?

    For instance G24 contains =IFERROR(IF($F$24=0,0,EDATE($F$24,12)),"").

    I modified the G24 cell to =IF($F$24="",0,EDATE($F$24,12)). It seems to work now.

    V/r,
    Jim
    Last edited by sorensjp; 08-26-2020 at 06:16 AM.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Yes, +G24 check real blank cell not blank by null string ""

    to check null string "" try

    =(F18*F39=1)*(MIN(G24,L39,H51,H53,H55)>= TODAY())*(count(G24,L39,H51,H53,H55)=5)

  12. #12
    Forum Contributor sorensjp's Avatar
    Join Date
    12-23-2015
    Location
    Yokosuka, JP
    MS-Off Ver
    2007 and 2016
    Posts
    196

    Re: Formula to show a Number 1 or 0 based on dates and numbers.

    Bo_Ry,

    I think your solution does the trick.

    You've already seen this project before as you created the base formula last year used in Cell L39.

    Again, Thank you for your help. As well as bebo021999.

    V/r,
    Jim

+ 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] Formula to show number of months (1st and last month inclusive) between 2 dates
    By antmcg12 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-17-2020, 04:46 PM
  2. [SOLVED] sum based between dates or week numbers with out effcting current formula (Advanced) ???
    By pmw19800 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-20-2019, 06:10 PM
  3. Formula to show all dates/codes under same Serial Number
    By Redreghan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-22-2016, 12:24 PM
  4. [SOLVED] formula to sum numbers based off of single or matching dates
    By nicki_rae22 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-21-2014, 01:24 PM
  5. Formula to show number of same numbers (0 or 1) in a row
    By bjn201 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-22-2013, 01:12 PM
  6. [SOLVED] Auto filling dates based on previously entered dates and averaging numbers if dates equal
    By grambograham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2012, 03:21 PM
  7. Replies: 3
    Last Post: 07-08-2009, 07:05 AM

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