How can I check a cell for current date and insert it if blank?

D

Don K

I am modifying the invoice template. I want to create a formaula that checks
the date cell for the current date. If a date occupies the cell nothing
happens, otherwise, the current date is inserted. Can this be done?

Thanks
Don
 
D

Don Guillett

Sub insertdate()
With ActiveCell
If Not IsDate(.Value) Then .Value = Date
End With
 
D

Don K

Hello DOn,

I appologize, but I'm pretty new to this and don't understand your
instructions
 
D

Don Guillett

Actually, I didn't give any instructions. I wrote a macro. Copy/paste into a
macro module and assign to a button or a worksheet event. You may want to
designate the cell to use
with range("a1")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top