How to input data twice each month

I want to input data from cell D5 twice each calendar month. I’ve tried various ways but cannot get it to work.

for example: =IF(OR(DAY(A399)=24, A399=7), D$5,0) enters data on the 24th each month but not the 7th. Where am I going wrong.

Ive tried playing around “if and” statements also but no joy.

You are comparing apples with lettuces. Presuming that A399 contains a date, you want to check day of month in both arguments to OR:

=IF(OR(DAY(A399)=24; DAY(A399)=7); D$5,0) 

If this answer helped you, please accept it by clicking the check mark ? to the left and, karma permitting, upvote it. That will help other people with the same question.

In case you need clarification, edit your question (don’t use an answer) or comment the relevant answer.

Thank you that is working. Yes A399 is a date and i wanted D5 to be input on both the 24th and the 7th each month