# 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?

• 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

• Do not hesitate to give your feedback ...and comment ...

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.

• Here is what I have. The teacher puts a 1 in the field under Skill 1 when they accomplish that skill. 0 if not accomplished. So when they put a 1 I want the field I want to copy the date and put it in the field with the formula.

## Images

• 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

• Sorry, I attached a sample file.

## Files

• test.xlsx

(10.45 kB, downloaded 14 times, last: )
• 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 ().

• Hello,

Since we are dealing with an IF statement ...

It would nice .. IF you could post your feedback ...

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

• Thank you for the help. Sorry for the delay in response had to go out of town. I did try your IF statement and it worked.

• Thanks for your feedback ...and for your thanks

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