Forum Discussion

AlexEanbu's avatar
AlexEanbu
Copper Contributor
Nov 23, 2024

EXCEL FILTER

GIVEN CODE "G2"

 

             I NEED RESULT  SAME AS TABLE 2,

NOTE: JAN TO DEC BY ORDER BUT IF SAME MONTH REPEATED, CONTINUE THE SAME MONTH WITH THEIR DETAILS THEN  FOLLOWED MONTH BY ORDER


KINDLY HELP ME

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Perhaps you want to consider a Power Query solution. Fairly easy by connecting to your data and the selected code in G2. Add a helper table with the 12 months in the correct order and merge it with the data and expand. Attached file contains a crude solution with no attempts to make it look nice.

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    Give a try to the following formula-

    =DROP(REDUCE("",{"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"},
    LAMBDA(a,x,IFERROR(VSTACK(a,FILTER(CHOOSECOLS(B3:D82,3,1,2),(A3:A82=G2)*(D3:D82=x),x)),""))),1)
    • AlexEanbu's avatar
      AlexEanbu
      Copper Contributor

      Thank you 
      but give other code

      Not Respond
      shows #name?

      • Harun24HR's avatar
        Harun24HR
        Bronze Contributor

        Then you are not on Microsoft Excel 365. What is your Excel version?

Resources