Okay, this is a fun one! We'll combine multiple functions with their weights and add a check for blank cells.
Let's assume you want the output of this weighted average in a new column, for example, Column G, starting from G2.
Here's the breakdown of the formula:
-
Check for Blank Cells:
IF(OR(ISBLANK(A2), ISBLANK(F2)), 0, ...)
This checks if cell A2 or F2 (for the current row) is blank. If either is true, the formula returns 0. Otherwise, it proceeds to the calculations.
-
Function 1 (for Column A):
(8.57 - 0.0157*A2 + 0.000136*A2^2 - 0.000000389*A2^3)
Weight: 0.049
So, in the formula: (8.57 - 0.0157*A2 + 0.000136*A2^2 - 0.000000389*A2^3) * 0.049
-
Function 2 (for Column A - Logarithmic):
(9.09 - 0.0256*LN(A2))
Weight: 0.045
So, in the formula: (9.09 - 0.0256*LN(A2)) * 0.045
Important Note: The LN() function (Natural Logarithm) requires a positive number. If A2 could be 0 or negative, this part of the formula would cause an error. If that's a possibility, you'd need an additional IF statement inside for LN(A2) or ensure your data is always positive. For now, we'll assume A2 will always be greater than 0.
-
Function 3 (for Column F):
(8.85 - 0.0356*F2 + 0.000318*F2^2 - 0.000000842*F2^3)
Weight: 0.094
So, in the formula: (8.85 - 0.0356*F2 + 0.000318*F2^2 - 0.000000842*F2^3) * 0.094
-
Combining Them:
The "weighted average" in this context seems to imply summing the results of each weighted function.
The Full Excel Formula
You can paste this formula into cell G2 (or any other cell in the row where you want the output for A2 and F2) and then drag it down for the rest of your data (G3, G4, ... Gn).
=IF(OR(ISBLANK(A2), ISBLANK(F2)), 0, ((8.57 - 0.0157*A2 + 0.000136*A2^2 - 0.000000389*A2^3) * 0.049) + ((9.09 - 0.0256*LN(A2)) * 0.045) + ((8.85 - 0.0356*F2 + 0.000318*F2^2 - 0.000000842*F2^3) * 0.094))
Explanation of components:
A2: Represents the value in cell A of the current row.
F2: Represents the value in cell F of the current row.
A2^2: A2 squared.
A2^3: A2 cubed.
LN(A2): Natural logarithm of A2.
How to Use:
- Open your spreadsheet.
- Go to cell G2 (or your desired output column and starting row).
- Paste the formula exactly as provided above into the formula bar.
- Press Enter.
- Click on cell G2 again.
- Grab the small square (fill handle) in the bottom-right corner of G2 and drag it down to
Gn (the last row of your data). The formula will automatically adjust for each row (e.g., A3, F3 in G3; A4, F4 in G4, etc.).
This formula will give you the combined weighted sum of the three functions, returning 0 if either A or F cell in that row is empty.