LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Entering Values and Updating Next Empty Cell in a Range Stilltrader47 Excel Worksheet Functions 2 March 14th 10 03:53 AM
Entering a Value & Updating the Next Empty Cell in a Range Stilltrader47 Excel Worksheet Functions 6 February 25th 10 05:17 AM
code to go down a column and find the last cell with data before an empty cell Steve G Excel Programming 1 July 23rd 07 08:22 AM
What is the Chr() code for Alt+Enter in a cell when entering text? Dennis Excel Discussion (Misc queries) 2 July 20th 06 11:49 PM
Formula is entering a default time when it comes across an empty cell.. Howie Excel Worksheet Functions 10 November 16th 05 11:34 AM


All times are GMT +1. The time now is 09:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"