View Single Post
  #2   Report Post  
Héctor Miguel
 
Posts: n/a
Default

hi, dolphinv4 !

... automate the following procedure using a macro
... In Sheet1, Cells B2,D2,F2 has the formulas "=Sheet2!F2", "=Sheet2!K2", "=Sheet2!P2"
... Every month when... i'd have to manually rekey... to reference the subsequent columns
... B2,D2,F2... from above to "=Sheet2!G2", "=Sheet2!L2", "=Sheet2!Q2"
... the following month... again to "=Sheet2!H2", "=Sheet2!M2", "=Sheet2!R2" [...]


i see a pattern of 5 columns between each formula, and using a macro you lose the 'undo' stack levels :(
otho, you could use [i.e.] offset() and a 'step-number' cell [i.e. in 'A1' sheet1] to refer to columns in sheet2
this way, you can always [for/back]ward to 'other' month by changing the 'A1-column_number' [or any other cell]
[b2] =offset(sheet2!$a$1,row()-1,$a$1)
[d2] =offset(sheet2!$a$1,row()-1,$a$1+5)
[f2] =offset(sheet2!$a$1,row()-1,$a$1+10) - drag/copy down b2,d2,f2...

hth,
hector.