Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mkerstei
 
Posts: n/a
Default Convert input cell into metric tons


Hey, I need a solution and can't quite figure it out myself. I was
hoping for some good ideas.

I have a cell that people will be inputing data into. This data is
requested in lbs. I need to convert it to metric tons by dividing the
input by 2204.6. I think its a formatting issue, but I don't know how
to custom format it. An example is below.

Example:
They input 10000 in cell C8 as pounds.
As soon as data is entered into C8, it is divided by 2204.6 and that is
what is left displayed in C8.

Does anyone know if this is possible, and what the best practice is for
doing so? Thanks.


Mike


--
mkerstei
------------------------------------------------------------------------
mkerstei's Profile: http://www.excelforum.com/member.php...o&userid=25688
View this thread: http://www.excelforum.com/showthread...hreadid=556273

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BenjieLop
 
Posts: n/a
Default Convert input cell into metric tons


mkerstei Wrote:
Hey, I need a solution and can't quite figure it out myself. I was
hoping for some good ideas.

I have a cell that people will be inputing data into. This data is
requested in lbs. I need to convert it to metric tons by dividing the
input by 2204.6. I think its a formatting issue, but I don't know how
to custom format it. An example is below.

Example:
They input 10000 in cell C8 as pounds.
As soon as data is entered into C8, it is divided by 2204.6 and that is
what is left displayed in C8.

Does anyone know if this is possible, and what the best practice is for
doing so? Thanks.

Mike


I don't think what you want to accomplish is possible (as far as I
know). What you will enter in cell C8 is what will appear in C8 (if you
enter 10000, it will appear as 10000 all the time).

Perhaps, what you can do is enter the following formula

=C8/2204.62

in, say, cell D8:

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=556273

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben
 
Posts: n/a
Default Convert input cell into metric tons

Mike

You need event code.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("C8")) Is Nothing Then Exit Sub
On Error GoTo CleanUp
Application.EnableEvents = False
With Target
If .Value < "" Then
.Value = .Value / 2204.6
End If
End With
CleanUp:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the above event code into that sheet module.

When you enter a number in C8 it will be divided by 2204.6


Gord Dibben MS Excel MVP

On Tue, 27 Jun 2006 18:45:57 -0500, mkerstei
wrote:


Hey, I need a solution and can't quite figure it out myself. I was
hoping for some good ideas.

I have a cell that people will be inputing data into. This data is
requested in lbs. I need to convert it to metric tons by dividing the
input by 2204.6. I think its a formatting issue, but I don't know how
to custom format it. An example is below.

Example:
They input 10000 in cell C8 as pounds.
As soon as data is entered into C8, it is divided by 2204.6 and that is
what is left displayed in C8.

Does anyone know if this is possible, and what the best practice is for
doing so? Thanks.


Mike


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mkerstei
 
Posts: n/a
Default Convert input cell into metric tons


wow, this is exactly what I needed. Thank you very much!


--
mkerstei
------------------------------------------------------------------------
mkerstei's Profile: http://www.excelforum.com/member.php...o&userid=25688
View this thread: http://www.excelforum.com/showthread...hreadid=556273

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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
reight click a cell without exiting from input mode Khoshravan Setting up and Configuration of Excel 2 April 9th 06 01:24 AM
Delete cell contents with input to adjacent cell Ashley Frank Excel Discussion (Misc queries) 1 October 5th 05 04:28 PM
Cell Value Updated based cell input DC Excel Discussion (Misc queries) 2 August 17th 05 11:07 PM
Vlookup and Indexing in excel CLSCHWIES Excel Worksheet Functions 2 December 4th 04 01:57 AM


All times are GMT +1. The time now is 01:10 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"