Home>

Enter the date of 2020/10/01 in D1 in advance. (It changes every month)

I want to write a code that copies the row and deletes the value in column C if the date in column B is October, but I don't know where to go from And below.
"If cells (i," B "). value<>" "And XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

We apologize for the inconvenience, and thanks for your guidance.

For example, in the following case, I would like to insert one line under the watermelon on the third line.
A B C

1 Product shipping date Price
2 Melon 11/2 100
3 watermelon 10/5 200
4 apples 11/3 50

Dim mx
Dim i
Application.ScreenUpdating = False
mx = Range ("B"&Rows.Count) .End (xlUp) .Row
For i = mx To 3 Step -1
If cells (i, "B"). value<>"" And XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Then
Rows (i) .copy
Rows (i + 1) .Insert Shift: = xlDown
Rows (i + 1) .Range ("B1"). Clearcontents

End If
Next

vba