Enter Multiple units and return conversion value for either

  • Thread starter Thread starter Dustin
  • Start date Start date
D

Dustin

I am putting together calculator for glass, in which I would like the user
to be able to enter a Square Foot quantity or a Square Meter quantity
(Whichever they have readily availible)

I have One Column for each

What I would like to do is return the converted value in its cooresponding
"Entry feild" or cell

In other words,

If I enter in the SqM Quantity it auto populates the SqFt Quantity and vice
versa.

Can any one point me in the right direction?

Thank you!
 
Dustin,

This can be done with a macro, if you are interested. Or a formula in a
third column can produce the value in aa common unit of measure (sq ft or sq
meter), and the user would fill out one column or the other.

How do you wish to proceed? Do you have the conversion handy?
 
The following macro will do that for you. I chose Column A as the Square
Meters column and Column B as the Square Feet column. Change these as
needed. This macro is a sheet macro and must be put in the sheet module to
operate properly. Right-click on the sheet tab and select View Code.
Copy/paste this macro into the displayed module. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target = "" Then Exit Sub
Application.EnableEvents = False
If Target.Column = 2 Then Target.Offset(, -1) = Target * 0.0929
If Target.Column = 1 Then Target.Offset(, 1) = Target * 10.76
Application.EnableEvents = True
End Sub
 
Thank You! This will be awsome!


Otto Moehrbach said:
The following macro will do that for you. I chose Column A as the Square
Meters column and Column B as the Square Feet column. Change these as
needed. This macro is a sheet macro and must be put in the sheet module to
operate properly. Right-click on the sheet tab and select View Code.
Copy/paste this macro into the displayed module. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target = "" Then Exit Sub
Application.EnableEvents = False
If Target.Column = 2 Then Target.Offset(, -1) = Target * 0.0929
If Target.Column = 1 Then Target.Offset(, 1) = Target * 10.76
Application.EnableEvents = True
End Sub
 
Back
Top