Thanks, Will
wi...@k2e.com
Short of this, if you've used the default sheet names, i.e. Sheet1, Sheet2,
etc, then after copying your formulas to another sheet, use search and replace
to change, e.g. Sheet3 to Sheet4.
=INDIRECT("Sheet"&SUBSTITUTE(RIGHT(CELL("filename",AV1),LEN(CELL("filename",AV1))-FIND("]",CELL("filename",AV1))),"Sheet","")-1&"!A1
")
change the -1 at the end to +1 if you want the sheet after the one you are on..
--
Regards,
Peo Sjoblom
(Use ROT13 to decode email)
"Myrna Larson" <myrna...@home.com> wrote in message news:m789st4cjfcghtgd8...@4ax.com...
Very picky: it could be done with a user-defined function with cell
reference and sheet offset arguments.
Function showoff( _
r As Range, _
s As Long, _
Optional rr As Boolean = True) As Variant
'-----------------------------------------------------------
Application.Volatile
s = s + r.Parent.Index
If s < 1 Or s > Worksheets.Count Then
showoff = CVErr(xlErrRef)
ElseIf rr Then
Set showoff = Worksheets(s).Range(r.Address)
Else
showoff = Worksheets(s).Range(r.Address).Value
End If
End Function
The optional rr argument allows it to return a range reference (default) or
an array of the range's values.