+ Reply to Thread
Results 1 to 5 of 5

modify array formula for additional arguments

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    modify array formula for additional arguments

    I have an array formula below which checks that every second column on row 4 is >0 and then divides every second column in row 7 by row 12 (if row 4 was >0). However what I also need to do is only do this when those cells in row 7 and row 12 are also >0 (to prevent div/0 errors). I have been fiddling with the formula but have not been able to make it work when trying to add these additional constraints.

    =SUM(IF((MOD(COLUMN($I7:$BZ7),2)=1)*$I4:$BZ4>0,($I7:$BZ7)/($I$12:$BZ$12)))

    It is probably pretty easy but array formulas do my head in so it would be good if someone can assist with this.

    thanks
    Last edited by neowok; 10-25-2013 at 06:59 AM.

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: modify array formula for additional arguments

    Hi,

    What version of Excel is this for? If 2007 or later, perhaps (array):

    =SUM(IFERROR(1/(1/(IF(MOD(COLUMN($I7:$BZ7),2)=1,$I7:$BZ7)/($I$12:$BZ$12))),0))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: modify array formula for additional arguments

    I applied the condition as the first statement of the array

    =SUM(IF($I$12:$BZ$12>0,IF((MOD(COLUMN($I7:$BZ7),2)=1)*$I4:$BZ4>0,($I7:$BZ7)/($I$12:$BZ$12))))


    Edit: IFERROR is genius!

  4. #4
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    Re: modify array formula for additional arguments

    Thanks tried the iferror one, this seems to work perfectly

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: modify array formula for additional arguments

    You're welcome!

+ 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. Array formula with MIN: too many arguments
    By mikmonto in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-01-2013, 04:25 AM
  2. [SOLVED] Additional Rule in Array Formula
    By Debbie Thomson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2013, 09:05 AM
  3. Array formula with an additional criteria
    By harleypop in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2009, 01:28 AM
  4. Modify SumIF... Array Formula
    By carl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-17-2005, 03:06 PM
  5. [SOLVED] RE: Modify SumIF... Array Formula
    By Peo Sjoblom in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-17-2005, 02:06 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