View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Find first empty cell in column J. Copy, paste special, value from

Add a commandbutton to your sheet. Then double click on it to go to the
sheet module. Put in code like this:


Private Sub CommandButton1_Click()
Dim r as Range, r1 as Range
set r = columns(10).SpecialCells(xlConstants)
set r1 = Interesect(columns(11),r1.EntireRow)
r1.Value = Date
r1.Numberformat = "mm/dd/yyyy"
End Sub

--
Regards,
Tom Ogilvy



"zzxxcc" wrote:

Hi,
I have searched this site for several hours, but I am not able to find the
answer I am looking for. I'm a novise om VBA - maybe that's why?

I need to [copy + paste special, value] the value of K1 [=NOW()] down to the
first empty cell in column J. Column J has got blank cells so the code needs
to ignore these blanks.

Please explain as for a VBA novise. Like: Where to put the code...
Full-text-code...

Just to explain the purpose: (I know how to do the following): Finally I
want to make a button assigned to this macro to enable a one-click operation
to paste the date/time value in the bottom of my continuously expanding list.
--
Thanks