If statement

  • I am trying to write a if statement for this situtation.


    In cell A1 copy cell H1 (which is a date) if the number 1 appears in cell D1. But if there is a 0 or blank in cell D1 in the cell leave A1 blank.


    Does anyone know how to write this IF statement?


    Thanks in advance.

  • Hello and Welcome to the Forum :)


    You are saying your cell H1 is a Date ... which means your request is : IF the Date is the First of the Month, display the Date


    So your could test following formula


    Code
    1. =IF(DAY(H1)=1,H1,"")

    Hope this will help

    :)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Yes, H1 is a date. If we enter 1 in D1 then copy H1 to the cell the formula is written in. If a 0 is in cell D1 leave the cell the formula is in blank.


    I tried the formula you sent but it did not work.


    Thank you in advance for any suggestions.

  • Hello,


    Images are by design ... dead objects ... totally useless ;(


    Best is to attach a sample file ...:)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

  • Thanks for your sample file :)


    So let's clarify your objective ...


    My guess is the following :


    Inputing 1 in cell F4 should automatically copy the date located in cell F11 to its destination ... i.e. cell B4 ...


    Is that right ...???


    If it is the case ... you could test in cell B4 ( and then copy it down...)

    Code
    1. =IF(F4=1,$F$11,"")

    Files

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Thumbs Up" icon, below, in the bottom right corner:)

    Edited once, last by Carim ().