Results 1 to 4 of 4

Having trouble inserting OFFSET() as variable twice in formula

Threaded View

  1. #1
    Registered User
    Join Date
    05-23-2019
    Location
    San Diego, CA
    MS-Off Ver
    2016
    Posts
    2

    Having trouble inserting OFFSET() as variable twice in formula

    Hi everyone,

    Long time lurker, first time poster. Online Excel 365.

    I have several sheets that I am running through to total sections and I want them to be dynamic based on raw data placed in a master list. Here is what I have so far:

    =SUMPRODUCT(SUMIFS(INDIRECT("'"&OFFSET(UPN!$A$2,,,UPN!$F$4)&"'!"&"F2:F534"),INDIRECT("'"&OFFSET(UPN!$A$2,,,UPN!$F$4)&"'!"&"$A$2:$A$534"),$A2))
    This works just fine, and the
    &OFFSET(UPN!$A$2,,,UPN!$F$4)&
    works great as a variable range.

    However, instead of hard coding the
    "F2:F534"
    , I was hoping to apply the same principle that worked for the first variable range.

    When trying:
    =SUMPRODUCT(SUMIFS(INDIRECT("'"&OFFSET(UPN!$A$2,,,UPN!$F$4)&"'!"&OFFSET('P1'!$F$2,,,'P1'!$K$1)),INDIRECT("'"&OFFSET(UPN!$A$2,,,UPN!$F$4)&"'!"&"$A$2:$A$534"),$A2))
    so that the
    OFFSET('P1'!$F$2,,,'P1'!$K$1)
    just replaces the
    "F2:F534"
    , I get a reference error.

    I must be doing something wrong with the quotes, but have tried in vain different combos and when I plainly type the
    OFFSET('P1'!$F$2,,,'P1'!$K$1)
    into a cell, it returns the correct array. Any idea what I am doing wrong? Thank you!
    Last edited by Techgique; 03-24-2022 at 01:18 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Trouble with Sumifs + Offset + Match (or other formula that might do the trick)
    By Absalon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2017, 04:34 AM
  2. Having trouble with macro formula referencing - offset? variable? help!
    By cljohnston64 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-14-2015, 10:37 AM
  3. trouble inserting formula...
    By Bedlam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2011, 03:29 PM
  4. Replies: 3
    Last Post: 05-24-2011, 11:11 PM
  5. Trouble inserting a formula
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2010, 06:43 PM
  6. Trouble performing a lookup in VBA (by inserting a formula)
    By Unreal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2007, 03:18 PM
  7. offset formula trouble
    By Don Juan in forum Excel General
    Replies: 1
    Last Post: 09-20-2006, 08:43 PM

Tags for this Thread

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