Why doesn't the temperature look up work?
Can anyone help?
Why doesn't the temperature look up work?
Can anyone help?
Try[VBA]application.worksheetfunction.vlookup[/VBA]
Charlize
Doesn't work.
[VBA]Private Sub CTemprature_Change()
TxtFluidDensity.Value = Application.WorksheetFunction.VLookup( _
CTemprature.Value, Range("G5:H25"), 2, False)
End Sub[/VBA].
Could I let this run over 3 colums,you select temperature and it automatically inserts the density and viscocity?
Hi Mr.G,
You should use Val.
Try this;
[VBA]Private Sub CTemprature_Change()
TxtFluidDensity.Text = Application.VLookup( _
Val(CTemprature.Value), Range("G5:H25"), 2, False)
End Sub[/VBA]
Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye
That works!!
Can I link viscocity to that also? It is in ("I5:I25")
Is it like this?
[VBA]Private Sub CTemprature_Change()
TxtFluidDensity.Text = Application.VLookup( _
Val(CTemprature.Value), Range("G5:I25"), 3, False)
End Sub[/VBA]
Erdin? E. Kara?am | Loves from Bursa city in Republic of T?rkiye
OK but fluid density is a text box on its own with info in Colum I
[vba]
Private Sub CTemprature_Change()
TxtFluidDensity.Text = Application.VLookup( _
Val(CTemprature.Value), Range("G5:H25"), 2, False)
TxtViscosity = Format(Application.VLookup( _
Val(CTemprature.Value), Range("G5:I25"), 3, False), ".000000")
End Sub
[/vba]
Thanx a lot it works.
Thank you