Getting input from one textbox and displaying output in second textbox after some calculations.

learner93

New Member
Joined
Jan 8, 2018
Messages
3
MATERIALTEMPERATUREALLOWABLE
STEEL300423
STEEL350427
STEEL400428
STEEL450425
STEEL500419
STEEL550410
STEEL600401

<tbody>
</tbody>

Hi all,
I have a table like this where I store my values. Also I have two textboxes inside a user form. One is for inputting the temperature value and other for outputing the allowable after forecasting for that particular temperature values.
  • What I was doing in the worksheet was,

  1. using index match function to get the values ,lower and upper to the input value ,
  2. using vlookup to get corresponding allowable
  3. Store these 4 values in particular cells
  4. using forecast function to interpolate from these for values
But i failed in converting these to vba. Please help.:)
Thanks in advance.:)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
First, dim the input value:
Dim inputtemp as double
Let's suppose the textbox where the user inputs a temp is Textbox1 and the result is TextBox2 (adjust as needed)

Code:
inputtemp = Textbox1.value
Textbox2.value = application.index(activesheet.range("C:C",application.match(inputtemp,activesheet.range("B:B"),1))
 
Upvote 0
First, dim the input value:
Dim inputtemp as double
Let's suppose the textbox where the user inputs a temp is Textbox1 and the result is TextBox2 (adjust as needed)

Code:
inputtemp = Textbox1.value
Textbox2.value = application.index(activesheet.range("C:C",application.match(inputtemp,activesheet.range("B:B"),1))




Hi,
Thanks for the answer, but it is not working . I have also tried using Application.WorksheetFunction instead of application.index().


Also the value to be shown in excel should be the one which should be obtained after three four calculations.

Please help me
 
Upvote 0
Which column is the Temperature and which is the Allowable?


temperature is in column b and allowable is in column c.


Also this many things have to be done
[COLOR=#333333 said:
I have a table like this where I store my values. Also I have two textboxes inside a user form. One is for inputting the temperature value and other for outputing the allowable after forecasting for that particular temperature values. [/COLOR]

  • What I was doing in the worksheet was,



  1. using index match function to get the values ,lower and upper to the input value ,
  2. using vlookup to get corresponding allowable
  3. Store these 4 values in particular cells
  4. using forecast function to interpolate from these for values
I dont have any idea on how to store the values I get during each calculations.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top