+ Reply to Thread
Results 1 to 6 of 6

Gone formula blind -cant get OFFSET formula to work

  1. #1
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Gone formula blind -cant get OFFSET formula to work

    I cant see where I am going wrong here. If I change to I5:I732 it works great, however I need it to work over a wider array. It just returns #VALUE

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(I5,ROW(I5:N732)-ROW(I5),0)),--(I5:N732<>0))

    Any idea?

    Thanks

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: Gone formula blind -cant get OFFSET formula to work

    ROW(I5:N732) is SAME as ROW(I5:I732)..
    It's just row number and number of rows is same no matter how many columns you get.
    Last edited by zbor; 09-25-2015 at 08:47 AM.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Gone formula blind -cant get OFFSET formula to work

    Try

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(I5,ROW(I5:N732)-ROW(I5),0))*(I5:N732<>0))

  4. #4
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Gone formula blind -cant get OFFSET formula to work

    Thanks Jonmo - works brilliantly now.

    I am sure my work around is very clunky for what I want to do, but all working now

    Basically I just wanted a mean average of a filterable array I5:N732 which ignored 0

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Gone formula blind -cant get OFFSET formula to work

    Glad to help..

    But it's my opinion that once you have a need for 1 formula that ignores hidden rows, you're very likely to have another, then another etc..
    Using that subtotal syntax in each formula becomes very expensive.
    Particularly since you mentioned you're doing an Average. That essentially will need to use the syntax twice
    Sumproduct(fortheSUM)/Sumproduct(fortheCOUNT)
    That will be doing the work of the subtotal function twice.

    I prefer to use a single helper column for the subtotal function, then refer to that column in a sumproduct (or any of the xxIFs functions)

    Say column O for example.
    O5: =SUBTOTAL(3,N5)
    Fill that down to O732
    This column gets filled with 1's and 0's (1 if row is visible, 0 if it is not)

    Now use
    =SUMPRODUCT(O5:O732*(I5:N732<>0)) to get your count of non 0's

    And you can then hide the helper column, and refer to it in any other formula you have that would need to ignore hidden rows.

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,583

    Re: Gone formula blind -cant get OFFSET formula to work

    Upload file showing what is required.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 9
    Last Post: 11-19-2014, 04:15 PM
  2. [SOLVED] weekday() result used in an array formula doesn't work. Formula works if i type in date
    By aarco50 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-25-2014, 03:25 PM
  3. Reformatting - insert formula with offset, then offset to next cell
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-06-2011, 05:41 AM
  4. Cannot get Offset and Match formula to work
    By endoskeleton in forum Excel General
    Replies: 4
    Last Post: 06-08-2011, 12:13 PM
  5. Trying to work formula for work TIME SHEET using IF formula
    By help_monique in forum Excel General
    Replies: 8
    Last Post: 10-12-2009, 11:46 PM
  6. Replies: 2
    Last Post: 10-08-2009, 09:51 PM
  7. Replies: 2
    Last Post: 01-03-2006, 05:42 PM

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