View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike H[_6_] Mike H[_6_] is offline
external usenet poster
 
Posts: 11
Default Refreshing one cell

Hi,

Excel won't like that because the correct syntax is

=IF(AND(A6="",B6<""),"",NOW())

But you will still have the same problem of NOW() updating every time the
worksheet calculates as soon as those 2 conditions evaluate as TRUE

Mike
"Mark A. Sam" wrote in message
...
This may be awkward for the client and before I do this, I'd like to ask
another question.

I tried modifying the formula using the And operator to test the value of
the cell containing the formula,

=IF(A6="" and B6<"","",NOW())

Excel didn't like it. Am I referencing the cells incorrectly or is this
just an illegal operation?

God Bless,

Mark

"Mike H" wrote in message
...
Hi,

You could do this. Right click your sheet tab, view code and paste this
in. It puts the static date/time in A3 whe A2 is updated

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Target.Address = "$A$2" Then
Application.EnableEvents = False
Range("A6").Value = Format(Now, "dd/mm/yyyy hh:mm")
Application.EnableEvents = True
End If
End Sub


Mike
"Mark A. Sam" wrote in message
...
Hello,

I'm not too proficient with Excel so hopefully this can be done. My
client is using this formula to update the date and time in a particular
cell:

=IF(A2="","",NOW())

He wants it to update only when A2 is updated, but it updates when any
cell is updated. Does this require a code and if so how to implement
it.

Thank you for any help and God Bless,

Mark A. Sam