Thread: Datestamp
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron de Bruin
 
Posts: n/a
Default Datestamp

Hi Pieman

You can use the change event in the sheet module to add the serial number
This example will run when you change a cell in A1:A20 and add the date/time in B

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("A1:A20"), Target) Is Nothing Then
Target.Offset(0, 1).Value = Now()
End If
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Pieman" wrote in message ...
Hi

Is there a way to generate a fixed serial number made up from the date and
time when an adjacent cell is given a value?

STATUS REF
R1 | Open | ?????????? |

I want to give each row entry a unique serial reference number which can
then be referenced and matched to identical entries in other worksheets. But
I only want this to be generated when text is enetered in the cell before it.
Once generated, I don't want the serial number to change with the date.

Any ideas would be appreciated.

Simon