+ Reply to Thread
Results 1 to 4 of 4

Nested address inside offset

  1. #1
    Registered User
    Join Date
    04-15-2008
    Posts
    17

    Nested address inside offset

    I am currently building a spreadsheet with integration into other workbooks.

    One of the issues that I have this. The source information I have in the outside workbook does not include information for Saturday's and Sunday's - It is information that simply does not (and never will exist in the source info), however the workbook that I am creating will have these 2 days and Month end and Year end can fall on those days and I need to include it.

    When I first built this spreadsheet, I did an error check that when the formula returns an error, just look at the above cell (because there won't be a change) and give me that result.

    In the end, I did stick with that, but I wanted to teach myself how to use the OFFSET and ADDRESS functions. Individually, I have gotten these formulae to work properly, but putting them together is giving me a problem. Now for this spreadsheet, it is not crucial, however, I would like to understand what I am doing wrong, as I think understanding this could but very useful in future spreadsheets.

    I tried to attaching a spreadsheet, but I could not for some reason. Ultimately the formula I am using are these:

    ADDRESS =ADDRESS(ROW(),COLUMN(),4) no issues at all, gives me F22

    OFFSET =OFFSET(F22,-2,0,1,1) no issues at all goes to 2 cells above F22

    NESTED ADDRESS INSIDE OFFSET =OFFSET((ADDRESS(ROW(),COLUMN(),4)),-2,0,1,1) just bings at me and I have to hit escape to go back.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    swindon, england
    MS-Off Ver
    Excel 2016 / Windows 10
    Posts
    3,929

    Re: Nested address inside offset

    Almost there

    =OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN(),4)),-2,0,1,1)

    Offset requires a Range
    Address creates a String, not a Range
    Indirect converts a String to a Range

    Offset and Indirect are both volatile functions (see link for an explaination of why they can be bad). http://www.decisionmodels.com/calcsecretsi.htm

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux
    Posts
    6,049

    Re: Nested address inside offset

    To avoid ADDRESS you can use the INDEX function which returns a cell ref

  4. #4
    Registered User
    Join Date
    04-15-2008
    Posts
    17

    Re: Nested address inside offset

    Perfect, thanks - worked well

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1