+ Reply to Thread
Results 1 to 3 of 3

Combine two working formulae using BYROW (or other function(s))

  1. #1
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    47,995

    Combine two working formulae using BYROW (or other function(s))

    Short story: I have two formulae that work to provide a solution. It would be more aesthetically pleasing (to me) if these could be combined into one formula.

    Long story ...

    I am working on a solution for a user and I have two formulae that, together, provide a complete answer. I would like to combine the two formulae using BYROW but I just can't get it to work.

    The two formulae are ...

    In A2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I've added the first formula into the second so the data is available ...

    In A12:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I thought I should be able to drop in a BYROW and reference the variable "u" as the range. But I am struggling to get it to work.

    Sample file attached

    Original thread: Index Match Min/Max!?!?

    Your thoughts, advice and assistance would be most welcome.
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Combine two working formulae using BYROW (or other function(s))

    Please try

    =LET(z,PaymentActivityT,n,INDEX(z,,2),pw,INDEX(z,,8),un,UNIQUE(n),m,INDEX(un,3),c,{7,6,12,13},b,{4,17},am,SUMIFS(INDEX(z,,4),n,un,pw,{" p*"," w*"}),
    DROP(REDUCE(0,un,LAMBDA(a,u,LET(f,FILTER(z,(n=u)*(pw=" Payment")),lt,TAKE(f,-1),ft,TAKE(f,1),tr,TOROW(VSTACK(INDEX(lt,c),INDEX(ft,c)),,1),
    VSTACK(a,HSTACK(u,INDEX(lt,b),INDEX(ft,b),IF(tr=" ","N/A",tr),XLOOKUP(u,un,am)))))),1))


    BYROW only generates 1 column result.
    Attached Files Attached Files
    Last edited by Bo_Ry; 04-19-2023 at 09:22 AM.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Combine two working formulae using BYROW (or other function(s))

    Better and shorter one

    =LET(z,PaymentActivityT,pw,INDEX(z,,8),p,FILTER(z,pw=" Payment"),n,INDEX(p,,2),un,UNIQUE(n),l,XMATCH(un,n),f,XMATCH(un,n,,-1),
    h,HSTACK(INDEX(p,HSTACK(f,f,f,l,l,f,l,f,l,f,l,f,l),{2,4,17,4,17,7,7,6,6,12,12,13,13}),SUMIFS(INDEX(z,,4),INDEX(z,,2),un,pw,{" p*"," w*"})),IF(h=" ","N/A",h))
    Attached Files Attached Files

+ 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. [SOLVED] Need to combine three formulae into one
    By VisionSmart in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-08-2023, 09:24 PM
  2. [SOLVED] BYROW(...LAMBDA(...) ) result in #CALC! error
    By dluhut in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-18-2022, 07:17 AM
  3. [SOLVED] Combine Two Formulae
    By Tim4971 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2019, 03:26 AM
  4. How to combine the WORKDAY function with an IF function to build a working Gantt chart.
    By roomaggoo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 07-07-2018, 11:54 AM
  5. Replies: 0
    Last Post: 07-07-2018, 04:13 AM
  6. Looking to combine two formulae
    By Supersadie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-01-2018, 08:42 PM
  7. Combine 3 formulae, please!!
    By thadacto in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2012, 09:29 AM

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