Here is a simplified example of what I want:
sheet 1
sheet 2
Essentially Column C finds the row on Sheet 2 with the same Item as Sheet 1 (Columns A) and sums up the Upgrade cost for the current Upgrade level.
So an Upgrade level of 3 finds the sum of Sheet 2, B:D where the Items are the same, where an Upgrade level of 5 will find the sum of B:F.
Best Answer
Add the following line of code into
Sheet1!C2
:The formula explained from the inside to the outside:
MATCH
in an equivalent of theVLOOKUP
. It will return a relative position as an integer, rather than a specific value.INDIRECT
combines aSTRING
with a value into a reference (B2
).OFFSET
is a not commonly used formula, but quite powerful. It sets the range of theSUM
.SUM
will sum the outcome.See the example file I created: Finding the SUM of an Array