View Single Post
  #10   Report Post  
Harlan Grove
 
Posts: n/a
Default

Peo Sjoblom wrote...
Relative referencing does not work between sheets so you either have

to use a
macro, UDF or do an edit replace

....

Not true! It can be done with built-in functions only *PLUS* an ordered
list of worksheet names. If the worksheets were named A, B, C, . . .,
BA (53 of 'em), then enter these worksheets names, one each per cell,
in a 53-row by 1-column range and name that range WSLST. Also create
the following defined names.

_FN_ referring to =CELL("Filename",INDIRECT("A1"))
WSN referring to =MID(_FN_,FIND("]",_FN_)+1,32)

Then enter the following formulas.

A!A1:
=1000000+1000*ROW()+COLUMN()

B!A1:
=2000000+1000*ROW()+COLUMN()

C!A1:
=3000000+1000*ROW()+COLUMN()

D!A1:
=4000000+1000*ROW()+COLUMN()

On each of these worksheets (A through D) fill A1 right into B1:D1,
then fill A1:D1 down into A2:D4. Then enter the following formulas for
comparison.

B!A6:
=A1-A!A1

B!A11:
=A1-INDIRECT("'"&INDEX(WSLST,MATCH(WSN,WSLST,0)-1)&"'!"&CELL("Address",A1))

Fill B!A6 right into B:B6:D6 then B:A6:D6 down into B!A7:D9. Fill B!A11
right into B!B11:D11 then B!A11:D11 down into B!A12:D14. Now copy
B!A6:D14 and paste into C!A6 and D!A6. Note that on C, the A6:D9 range
becomes 2000000 while the A11:D14 range remains 1000000; on D, the
A6:D9 range becomes 3000000 while the A11:D14 range remains 1000000.

This is fragile in the sense that the INDIRECT formulas critically
depend on WSLST containing the worksheet names in order. Inserting,
deleting or reordering worksheets will thoroughly screw up these
formulas unless you update WSLST.