#1   Report Post  
pilotjs
 
Posts: n/a
Default product function

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

  #2   Report Post  
William Horton
 
Posts: n/a
Default

Unless you use a macro there is no way for Excel to convert a cell to another
value in the same cell. You will have to enter the value in, say, cell A1
and have cell A2 contain the formula =A1*6. Whatever you enter in cell A1
will be multiplied by 6 and displayed in A2.

Again, if you want all this to be done in the same cell you need to use a
macro. If you need that let me know.

Hope this helps.

Bill Horton

"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

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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

  #4   Report Post  
pilotjs
 
Posts: n/a
Default

thanks for the prompt reply. I understand what you are saying and I could do
that, however, what is this macro you are talking about? It sounds promising.

"William Horton" wrote:

Unless you use a macro there is no way for Excel to convert a cell to another
value in the same cell. You will have to enter the value in, say, cell A1
and have cell A2 contain the formula =A1*6. Whatever you enter in cell A1
will be multiplied by 6 and displayed in A2.

Again, if you want all this to be done in the same cell you need to use a
macro. If you need that let me know.

Hope this helps.

Bill Horton

"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

  #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




  #6   Report Post  
David Billigmeier
 
Posts: n/a
Default

You don't need a macro for this. Enter 6 in any cell, copy that cell, then
select the entire range you have the gallon's in and "paste
special-multiply."

--
Regards,

David Billigmeier



"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

  #7   Report Post  
JE McGimpsey
 
Posts: n/a
Default

You don't need a macro for this.

That would be true if you ignore the OP's use of "automatically
convert"...

In article ,
"David Billigmeier"
wrote:

You don't need a macro for this. Enter 6 in any cell, copy that cell, then
select the entire range you have the gallon's in and "paste
special-multiply."

--
Regards,

David Billigmeier



"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Product Function in Pivot Tables from Multiple Consolidation Range bbishop222 Excel Worksheet Functions 0 February 22nd 05 04:55 PM


All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"