Look Specifi Date and Copy Formula

brites

Board Regular
Joined
Aug 19, 2004
Messages
224
Hi guys, this is a entrance / exit time control spreadsheet.
Once I click the button, I need a macro to look for "today" on Column A and copy the formula "=now()" on the respective row on column B.

Im getting confused on the "look for" part... Tx in advance!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
I Got it!!!
Thx anyway!

If there is any fancier way, please share!

Sub Entrance()

Dim r As Long
Dim day As Date
For r = 2 To 366
day = Range("A1")
'I left it with a formula
If Cells(r, 1) = dia Then
Cells(r, 5) = "=now()"
End If
Next r

End Sub
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top