View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
swiftcode swiftcode is offline
external usenet poster
 
Posts: 36
Default Cell display after input

Hi James & Mike,

Thanks for your help. Really appreciate it.

Have a good day.

Rgds
Swiftcode

"Mike H" wrote:

Hi,

add this to James' code:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then 'change to suit
Application.EnableEvents = False
If VarType(Target) = vbDouble Then
Target = Target / 100
End If
End If
Application.EnableEvents = True
End Sub

Mike

"swiftcode" wrote:

Hi James,

Thanks for your help. Your post solved the inital question, but would it be
possible to target only a specific cell.

Thanks
Swiftcode

"Zone" wrote:

Copy this code. Right-click on the sheet tab, select View Code, and paste
the code in there.
James

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If VarType(Target) = vbDouble Then
Target = Target / 100
End If
Application.EnableEvents = True
End Sub


"swiftcode" wrote in message
...
Hi,

I am wondering if i am able to change the value of an input immendiately
after pressing enter in a cell. E.g.

If i type "1000" into a cell, after i press enter it will take the
1000/100
and display a value of "10" in the cell.

Thanks
Swiftcode