View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default copy a changing formula???

Yes. Have a look in HELP index for INDIRECT.


--
Don Guillett
SalesAid Software

"Newbie" wrote in message
...
Hi,
I have the following formula
=VLOOKUP(A1,Jan2004'!$A$2:$I$235,9,FALSE)

However, each month the worksheet changes (Feb2004, Mar2004 etc) and the
range could be more or less
is there a way to build this formula in code and replace the sheetname and
range with variables and then paste and copy this down in to a column on
another sheet where the column heading is the same as the sheet name?

ie. Sheet where the formula appears is laid out like so

Code(lookup value) Jan Feb Mar Apr etc

appropriate data needs to be input into the correct column based on the
sheet name i.e Jan2004, Feb2004 Mar2004

Thanks