Thread: Format Cells
View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
.Value = .Value * 2.54
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"MAWII" wrote in message
...
I'm trying to figure out a way (if there's one) to enter a number into a
blank cell and have it automatically multiply that cell by 25.4

(essentially
converting a number from in. to mm.), keeping the new number in that same
cell: enter 2 into A2 and it converts it to 50.8 and A2 now shows 50.8.

Is this possible?

Thanks.