I want to lookup a moving range in a table.
account week 1 week2 week 3 This week week 5
a 1 2 3 4 5
b 1 3 4 5 6
c 2 3 3 5 5
d 2 2 5 3 2
So I want to use a looukp to say the sales for account b this week and last
week were 9 units. I will only update the this week columm so I want my
formlua to search for quot;this weekquot; and return the value for the sum of quot;this
weekquot; and quot;this weekquot; -1.
If your table begins in A1, then this ought to do it:
=sum(offset($A$1, match(quot;bquot;,$A:$A,false)-1,match(quot;This
weekquot;,$1:$1,false)-2,1,2))
(Change A and 1 as needed to meet your needs; you could also change quot;bquot; to
refer to a cell containing the account of interest).
In words, it says to find quot;bquot; in column A and move down that many rows, less
1, from $A$1. Then find quot;This weekquot; in row 1 and move over that many
columns, less 2. Add the values of in the rectangle one row high and two
columns wide from that starting point.
HTH. --Bruce
quot;Inni17quot; wrote:
gt; I want to lookup a moving range in a table.
gt;
gt; account week 1 week2 week 3 This week week 5
gt; a 1 2 3 4 5
gt; b 1 3 4 5 6
gt; c 2 3 3 5 5
gt; d 2 2 5 3 2
gt;
gt; So I want to use a looukp to say the sales for account b this week and last
gt; week were 9 units. I will only update the this week columm so I want my
gt; formlua to search for quot;this weekquot; and return the value for the sum of quot;this
gt; weekquot; and quot;this weekquot; -1.
- Jul 20 Thu 2006 20:08
offset a lookup in excel
close
全站熱搜
留言列表
發表留言