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

learner93

New Member
Joined
Jan 8, 2018
Messages
3
[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD]MATERIAL[/TD]
[TD]TEMPERATURE[/TD]
[TD]ALLOWABLE[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]300[/TD]
[TD]423[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]350[/TD]
[TD]427[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]400[/TD]
[TD]428[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]450[/TD]
[TD]425[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]500[/TD]
[TD]419[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]550[/TD]
[TD]410[/TD]
[/TR]
[TR]
[TD]STEEL[/TD]
[TD]600[/TD]
[TD]401[/TD]
[/TR]
</tbody>[/TABLE]

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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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