Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Time Stamp in multiple cells

I am trying to place a time stamp in cell L2 if there is text inside of cells
F2:J2. This will be a reoccuring item that will happen in each row from row
1-500. This seems like it should be an easy thing to do but I can't wrap my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007, granted
it did not say 'worksheet module', just module. But I have no idea how to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Time Stamp in multiple cells

maybe this in l2

=IF(AND(F20,G20,H20,I20,J20),NOW(),"")

--


Gary


"Murph" wrote in message
...
I am trying to place a time stamp in cell L2 if there is text inside of cells
F2:J2. This will be a reoccuring item that will happen in each row from row
1-500. This seems like it should be an easy thing to do but I can't wrap my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007, granted
it did not say 'worksheet module', just module. But I have no idea how to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Time Stamp in multiple cells

A worksheet_change event fires when a cell in the desired range is CHANGED.
I'm still not quite sure what you want. Please give a better explanation
with examples. What is here will put a date stamp in cell a1 if any cell in
f2:j2 is changed.



--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
I am trying to place a time stamp in cell L2 if there is text inside of
cells
F2:J2. This will be a reoccuring item that will happen in each row from
row
1-500. This seems like it should be an easy thing to do but I can't wrap
my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to
watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007,
granted
it did not say 'worksheet module', just module. But I have no idea how to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in
advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Time Stamp in multiple cells

Gary - That was close but did not work exactly. I had to tweak teh formula to
this:
=IF(OR(G20,H20,I20,J20,K20),NOW()," ")
But even then it did not give an individual time for each row. The now
function simply over rode and gave the same time for each cell that had that
formula in place.

In other words - when a cell was filled in, between G:K on whichever row, it
would change the time on ALL the rows. So I'm still lost as to how to fix
this.

"Gary Keramidas" wrote:

maybe this in l2

=IF(AND(F20,G20,H20,I20,J20),NOW(),"")

--


Gary


"Murph" wrote in message
...
I am trying to place a time stamp in cell L2 if there is text inside of cells
F2:J2. This will be a reoccuring item that will happen in each row from row
1-500. This seems like it should be an easy thing to do but I can't wrap my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007, granted
it did not say 'worksheet module', just module. But I have no idea how to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Time Stamp in multiple cells

I'm having a hard time grasping the idea of the 'module' concept. I go into
MicroSoft VB through Excel - Click "insert' select 'module' and paste that
information in. I do change the ranges now to G2:K2 and change the A1 to L2.
So there I have it in place. I click 'save' and I assume I am good to go. I
go to teh worksheet, type in a letter to cell g2 and nothing happens. This is
where I get puzzled.

Is the 'module' a 'macro' and can I view it somehow? How do I know the
module has been accepted?

Most importantly I need to do this for every row in this worksheet - how do
I expand that code for every row and not just row 2?

"Don Guillett" wrote:

A worksheet_change event fires when a cell in the desired range is CHANGED.
I'm still not quite sure what you want. Please give a better explanation
with examples. What is here will put a date stamp in cell a1 if any cell in
f2:j2 is changed.



--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
I am trying to place a time stamp in cell L2 if there is text inside of
cells
F2:J2. This will be a reoccuring item that will happen in each row from
row
1-500. This seems like it should be an easy thing to do but I can't wrap
my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to
watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007,
granted
it did not say 'worksheet module', just module. But I have no idea how to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in
advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Time Stamp in multiple cells

A sheet module is part of the worksheet on which you want to run the code.
ONE way to get there is to Right click sheet tabview codeVOILA!.
However, I still don't understand what you want. Can't you give examples?

--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
I'm having a hard time grasping the idea of the 'module' concept. I go
into
MicroSoft VB through Excel - Click "insert' select 'module' and paste that
information in. I do change the ranges now to G2:K2 and change the A1 to
L2.
So there I have it in place. I click 'save' and I assume I am good to go.
I
go to teh worksheet, type in a letter to cell g2 and nothing happens. This
is
where I get puzzled.

Is the 'module' a 'macro' and can I view it somehow? How do I know the
module has been accepted?

Most importantly I need to do this for every row in this worksheet - how
do
I expand that code for every row and not just row 2?

"Don Guillett" wrote:

A worksheet_change event fires when a cell in the desired range is
CHANGED.
I'm still not quite sure what you want. Please give a better explanation
with examples. What is here will put a date stamp in cell a1 if any cell
in
f2:j2 is changed.



--
Don Guillett
SalesAid Software

"Murph" wrote in message
...
I am trying to place a time stamp in cell L2 if there is text inside of
cells
F2:J2. This will be a reoccuring item that will happen in each row from
row
1-500. This seems like it should be an easy thing to do but I can't
wrap
my
brain around it this morning.

The formula I have so far is simply:
=IF(F20,NOW(), )

This gives me a time stamp for only cell F2, but I need the formula to
watch
from F2-J2. Thanks in advance.

"Mike" was kind enough to provide me with this to place into a
worksheet
module in VBA. I was able to place this in a 'module' in Excel 2007,
granted
it did not say 'worksheet module', just module. But I have no idea how
to
make it work, it is not listed under my macros.

Obviously I'm new to this so any help would be appreciated. Thanks in
advance.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("F2:J2")) Is Nothing Then
With Target
If .Value < "" Then
Range("A1").Value = Format(Now(), "hh:mm:ss AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub




Reply
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
Time/Date Stamp Multiple Rows DataGuy Excel Discussion (Misc queries) 1 March 31st 09 03:45 AM
Time stamp M John Excel Discussion (Misc queries) 3 April 14th 08 05:51 PM
MULTIPLE DATE/TIME stamp ruben Excel Worksheet Functions 3 May 6th 07 04:28 PM
time stamp on MULTIPLE cells by PASTING FARAZ QURESHI Excel Discussion (Misc queries) 2 January 11th 07 08:51 PM
time stamp a cell that doesn,t change when time stamping another RC Excel Programming 5 October 13th 05 02:52 AM


All times are GMT +1. The time now is 05:15 PM.

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"