Originally Posted by
leo73pk
Dear Brayn,
I'm not asking just to calculate the increase. Instead I'm simply looking for the formula which performs the following function;
In one file I have 2 columns one is for Heights (in meters) & other is for Equivalent Ltrs.
In second file we have two columns in first column if we insert height, the formula in second column returns the equivalent litres against the height we insert in the first column, from the file 1, But if the exact height not found then it determine between which two heights of file 1 our inserted value falls & then based on the following logic it return the result.
Assume in Column A we insert height 5.254 which is not exactly found in File 1, but this values lies between the two available heights i.e. 5.250 & 5.260 for which equivalent ltrs are given in File-1. therefore we need to do following calculations to get the litres at height 5.254
Take 5.250 & 5.260 as 5.254 lies between these two heights & take equivalent ltrs from column-b of file-1.
At Height 5.250 equivalent Ltrs are 5246640 & at 5.260 equivalent Ltrs are 5256799.
The Logical Formula which Calculate the liters at height 5.254 is as follows (from File-1)
=(5256799-5246640)/(5.260-5.250)*(5.254-5.250)+5246640
=5,250,704
Regards,
jbman
The sought after correctly adjusted VLookup value is
=(5256799-5246640)/(5.260-5.250)*(5.254-5.250)+5246640
to relate everything back to your 2 knowns, base (=5,254) and table:
. . . quite honestly if I made a small error in that you might never find it, you'll just get low marks.
To work from a number of cells gives you a chance to detect where an error has occurred and to gain a basic understanding of what you are trying to achieve, rather than to ask for an enormous formula that you will never be able to understand, check, fix, modify nor explain.
This work is almost identical to your prior question relating to the adjustment of a VLookup'd figure to calculate the minor adjustment required where the matched figure was not equal the requested lookup.
The same formula applies, just a different table and a different base amount.
Does this answer your question?
-------
Bookmarks