If functions??

  • Thread starter Thread starter DBassmaker
  • Start date Start date
D

DBassmaker

Im trying to create a spreadsheet file where I can input data into a
column and have it insert a certain factor. For example I want to be
able to input data so that if i type 70 in one column it enters .985 in
the next column and if i enter 71 then 979 is entered that column and so
forth. The numbers are part of a temperature correction factor for a
lab test so they range from 60 to 89 degrees therefore there are about
30 if then combinations. I tried visual basic but got lost can anyone
help me out with a code or point me in the right direction??

Thanks
 
DBassmaker said:
Im trying to create a spreadsheet file where I can input data into a
column and have it insert a certain factor. For example I want to be
able to input data so that if i type 70 in one column it enters .985 in
the next column and if i enter 71 then 979 is entered that column and so
forth. The numbers are part of a temperature correction factor for a
lab test so they range from 60 to 89 degrees therefore there are about
30 if then combinations. I tried visual basic but got lost can anyone
help me out with a code or point me in the right direction??

Thanks

Here is what you can do. Enter, for example, your temperatures in
Column A and the corresponding temperature correction factor in Column
B. You now have constructed a table with range A1:B29.

To determine the correction factor at any given temperature, use this
formula

=VLOOKUP(C1,$A$1:$B$29,2,0)

where C1 contains the input data (temperature).

Regards.
 
DBassmaker,

You haven't defined the relationship between the input data and the
corresponding correction factor. With the two examples you give, it could
be anything. Is there a mathematically defined relationship? Or do you
have a table of them? Eh, what?
 
Earl,

This is most probably a temperature correction for calculating volume
and/or determining API gravities. This is an exercise that is done ver
regularly in the petroleum industry.

Most of the time, the volumes and API gravities are known at ambien
temperatures and they (volumes and API gravities) need to b
corrected/converted to values at 60ºF. (Yuuuppppp, in the good ole USA
the Fahrenheit system is still in use).

In the pre-computer age, the correction factor was manually "looked up
in a table, i.e., for every temperature there was a correspondin
correction factor. And since Excel is now available, the manual looku
process is already being "dispensed" with
 
BenjieLop,

Then you've covered it nicely. The one thing I'd suggest is keeping the two
tables separate. Keep some rows or columns between them. Better yet, one
could cut-paste the looked-up table to another sheet, and the formulas would
take care of themselves. Now both could be named appropriately, and there
ya' go.
 
Back
Top