View Single Post
  #5   Report Post  
pilotjs
 
Posts: n/a
Default

thanks for the help, I'll try that.

js

"JE McGimpsey" wrote:

If you're trying to convert it in the same cell, you'll need to use an
event macro. You might consider separating the entry from the weight:

A1: <gallons
B1: =A1 * 6

If you must do it in one cell, however, you can put this in your
worksheet code module (right-click the worksheet tab and choose View
Code):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If .Address(False, False) = "A1" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
.Value = .Value * 6
Application.EnableEvents = True
End If
End If
End With
End Sub



In article ,
"pilotjs" wrote:

This should be a very simple fix, I'm just not that schooled in excel and its
formulas. I'm tying to enter one number in a cell and it automatically
convert it to another in the same cell.

example: I'm going from gallons of fuel to weight (lbs). 1 Gal Fuel=6lbs.

it's a simple multiplication formula or it should be.

thanks,
js