Formula stops working on certain cells????

SPUSHECK

New Member
Joined
Sep 22, 2006
Messages
6
I am using the formula below and the problem is that the date always works but once I get to row 35 the time stops being entered.
Any suggestions?

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("B32:B99")) Is Nothing Then
Application.EnableEvents = False
Target.Offset(0, -1).Value = Now
Application.EnableEvents = True
End If
On Error GoTo 0

End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829
Sorry, you said formula, when you actually have VBA code, in which I pass!
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
55,810
Office Version
  1. 365
Platform
  1. Windows
SPUSHECK

I suggest that you have a look at the formatting of the problem cells. It may be that they are formatted as DATE rather than a CUSTOM Date/Time format.
 

RalphA

Well-known Member
Joined
May 14, 2003
Messages
3,829
Peter, your suggestion look very reasonable and probable, to me. Good thinking. Perhaps, with more acumen on my part, I would have thought the same.
 

Forum statistics

Threads
1,171,722
Messages
5,877,128
Members
433,235
Latest member
adhollan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top