ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   How can I check a cell for current date and insert it if blank? (https://www.excelbanter.com/new-users-excel/112197-how-can-i-check-cell-current-date-insert-if-blank.html)

Don K

How can I check a cell for current date and insert it if blank?
 
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

Don Guillett

How can I check a cell for current date and insert it if blank?
 
Sub insertdate()
With ActiveCell
If Not IsDate(.Value) Then .Value = Date
End With

--
Don Guillett
SalesAid Software

"Don K" <Don
wrote in message
...
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




Don K

How can I check a cell for current date and insert it if blank
 
Hello DOn,

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

"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"Don K" <Don
wrote in message
...
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





Don Guillett

How can I check a cell for current date and insert it if blank
 
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")

--
Don Guillett
SalesAid Software

"Don K" wrote in message
...
Hello DOn,

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

"Don Guillett" wrote:

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

--
Don Guillett
SalesAid Software

"Don K" <Don
wrote in message
...
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








All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com