+ Reply to Thread
Results 1 to 3 of 3

Thread: SumProduct, Index & Left

  1. #1
    Registered User
    Join Date
    01-18-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    21

    SumProduct, Index & Left

    I am using the formula below but want to extend its functionality.

    Enter as array formula in V48:AJ61
    = IF(SUMPRODUCT(--($R$7:$R$22=V$47))>=ROWS(AB$48:AB48),INDEX($AC$7:$AC$22,SMALL(IF($R$7:$R$22=AB$47,ROW($R$7:$R$22)-ROW($R$7)+1),ROWS(AB$48:AB48))),"")

    This is fine where I can match entries in R7:R22 with the specific text in AB47 (their cost being in AC7:AC22).

    But I want to pick up various general entries from R7:R22 that contain mixed details but cost still listed in AC7:AC22. I do not want to add columns and subdivide AC7:AC61 further by using the above as it would mean 20 more columns for the sake of 28 entries

    I thought if I prefix the relevant entries in R7:R22 with “Office” I could use =(LEFT($R$7:$R$22,6)="Office" as a substitute for =AB$47

    Below is what I entered as array but it is not working
    = IF(SUMPRODUCT(--($R$7:$R$22=(LEFT($R$7:$R$22,6)="Office")))>=ROWS(S$48:S48),INDEX($AC$7:$AC$22,SMALL(IF($R$7:$R$22=( LEFT($R$7:$R$22,6)="Office"),ROW($R$7:$R$22)-ROW($R$7)+1),ROWS(S$48:S48))),"")

    Any advice would be most welcomed

    julhs
    Attached Files Attached Files
    Last edited by julhs; 01-29-2012 at 07:19 PM.

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: SumProduct, Index & Left

    Hello juhls, try this version in AB43 confirmed with CTRL+SHIFT+ENTER and copied down

    =IF(COUNTIF($R$7:$R$22,AB$42&"*")>=ROWS(AB$43:AB43), INDEX($AC$7:$AC$22,SMALL(IF(LEFT($R$7:$R$22,LEN(AB$42))=AB$42,ROW($R$7:$R$22)-ROW($R$7)+1),ROWS(AB$43:AB43))),"")

    That will pick up all column AC values where the corresponding entry in column R begins with the text in AB42
    Last edited by daddylonglegs; 01-28-2012 at 12:40 PM.
    Audere est facere

  3. #3
    Registered User
    Join Date
    01-18-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: SumProduct, Index & Left

    Many thanks daddylonglegs, worked a treat.

    I will obviously have to do some reading up on the "Len function" to better understand what you have given me and possibly adapt it for use else where.

    Regards

    juhls

+ 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.2.0