Forum Discussion

  • deniztopcu 

    You need to define your source somehow in any case. Assuming that's range named "data" and assuming you are on Excel 365 that could be

    =LET(
        start, XMATCH($H$19, CHOOSEROWS(data, 1)),
        end, XMATCH(TRUE, CHOOSEROWS(DROP(data, , start), 1) <> "") + start,
        headers, HSTACK({"Name"}, CHOOSEROWS( DROP(data, , COLUMNS(data) - end + 2), 3 ) ),
        VSTACK( headers,
        HSTACK(
            TOCOL(CHOOSECOLS(data, 1), 1),
            DROP(data, 3, COLUMNS(data) - end + 2)
        )
    ) )

     

    • deniztopcu's avatar
      deniztopcu
      Brass Contributor

      SergeiBaklan

      I don't have 365, I made the code partially with props. I can't use this code and I realized that I wrote the topic incompletely. outside the main topic
      I have one more question.
      1) I need to subtract all but Q1 (**/3) for quarterly net worth.

      I could do it using if, but I'd stretch this long formula even further.
      Instead of entering the formula one by one as in the dark blue region, I want to see the same result as a group as in the yellow region at once.

       

       

      • peiyezhu's avatar
        peiyezhu
        Bronze Contributor
        but Q1 (**/3) ?

        which sheet is your raw data?
        which range is your expected result?

Resources