I have a spreadsheet with dates in column B.

I have a macro routine that pastes formula into Column C. I only want to paste the formula into rows in column C where the date in Column B = today or yesterday (dynamically).

Can anyone assist with the code that would do that - I can then run my macro afterwards