Profile cover photo
Profile photo
Roberto Michelena
69 followers
69 followers
About
Posts

Hey guys, in a workbook I need to be able to reference "the next n sheet after this one" instead of "Sheet1" or "Invoices" or whatever the sheet is called.

To illustrate, in Excel I had to resort to a custom VB function I called "RelSheet" that read as follows:

Function RelSheet(rSh As Integer, rCell As Range)
Application.Volatile
Dim i As Integer
i = rCell.Cells(1).Parent.Index
RelSheet = Sheets(i + rSh).Range(rCell.Address)
End Function

And then from any cell in my first sheet, I'd pull a value from another sheet by using something like this:
=RelSheet(3,A40)
which means pull value from cell A40 of the third sheet after this one.

Can custom functions be written in Apps Script? would it be easy to make an App Script equivalent to the above, to be used in Google Sheets ?

thnx

Post has attachment

Post has attachment
StackSocial - Google+
StackSocial - Google+
plus.google.com
Add a comment...

Post has attachment

Post has attachment
Add a comment...

Post has attachment
StackSocial - Google+
StackSocial - Google+
plus.google.com
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...

Post has attachment
Add a comment...
Wait while more posts are being loaded