Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Entering value into cell via VB code if cell is empty
Hi there everyone;
Again thanks a lot in advance for the time and help. This time the question is; I'm trying to write a code which should check the cell if it's empty or not. If it's empty, code should write the current time into cell. If the cell is not empty, code should go to the other cell to check if that one is empty or not. Here is my unsuccessful code; ________________________________________ Function zaman() ActiveCell = Time() ActiveCell.NumberFormat = "hh:mm" End Function __________________________________________ Sub ar1open() Range("D9").Select If D9 = "" Then D9 = zaman Else Range("D10").Select If D10 = "" Then D10 = zaman End If End If End Sub Best Regards. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Entering Values and Updating Next Empty Cell in a Range | Excel Worksheet Functions | |||
Entering a Value & Updating the Next Empty Cell in a Range | Excel Worksheet Functions | |||
code to go down a column and find the last cell with data before an empty cell | Excel Programming | |||
What is the Chr() code for Alt+Enter in a cell when entering text? | Excel Discussion (Misc queries) | |||
Formula is entering a default time when it comes across an empty cell.. | Excel Worksheet Functions |