View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Autoupdating a range with Vlookup?

Maybe you could use a formula like this in M2:

=SUM($D2:OFFSET($M2,0,-1))

I'm not sure how =vlookup() would fit in this.

Erin Dicks wrote:

I have a spreadsheet that calculates year to date information across a range
of columns (D through O). The problem is that there is always some info in
all 12 columns. Each month I update formulas to include an additional column
(e.g. sum(D2:J2) to sum(D2:K2). There are quite a few formulas to update. I
use an absolute cell reference in other formulas that specifies the number of
months (e.g. 8 months) and I would like to use a VLOOKUP formula to use this
value to determine what column my SUM formula should use. For example, if it
is month 8 I would like my SUM formulas to change to sum(D2:K2), in month 9
to sum(D2:L2) etc. There must be a simple way to do this - can anyone help?

Thanks.


--

Dave Peterson