+ Reply to Thread
Results 1 to 2 of 2

combining an IF function with an INDEX array function?

  1. #1
    Registered User
    Join Date
    02-15-2012
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    5

    combining an IF function with an INDEX array function?

    I have an INDEX array function :
    "=INDEX(FREQUENCY(FREQUENCY(IF(C2:C45000,ROW(C2:C45000)),IF(C2:C45000<>"TRUE",ROW(C2:C45000))),{0,1}),2)"
    to count how many consecutive TRUE values I have. This works great in counting a straight forward list, however i need to combine it to only count the consecutive TRUE values if something is turned on. I have tried to add an IF function to the beginning:
    "=IF(D2:D45000>0,(INDEX(FREQUENCY(FREQUENCY(IF(C2:C45000,ROW(C2:C45000)),IF(C2:C45000<>"TRUE",ROW(C2:C45000))),{10,1000}),2)))"
    but this does not work. Ideally I want the above IF to count consecutive values if Dx>0 but if D=0 then skip over that value (even if it is TRUE) and proceed to the next.

    Any suggestions?

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: combining an IF function with an INDEX array function?

    Cross-posted here - please read rule 8.
    Good luck.

+ 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