Forum Discussion

Officeuser7777's avatar
Officeuser7777
Copper Contributor
Jun 20, 2024

Counting within 3 columns

Hi, not feeling too smart here. How do I code Excel to make the result table below, counting number of unique occurrences of fruit types across 3 columns? Col1 etc refer to Table columns in DataTable in the Data sheet. So I presume the array to count in is Data!DataTable[[Col1]:[Col3]] or something like that? And not sure what function to use. Thank you. 

 

    • Officeuser7777's avatar
      Officeuser7777
      Copper Contributor

      Peter and Oliver, thank you. That worked great. Wish I could tag you both with best answer.

  • Officeuser7777's avatar
    Officeuser7777
    Copper Contributor
    Bumped. Still hoping there is a formula solution for this. I tried messing with Power Query but did not figure out a fix.
    • Riny_van_Eekelen's avatar
      Riny_van_Eekelen
      Platinum Contributor

      Officeuser7777 

      Not sure what got you 'bumped' or what SUMPRODUCT solution you saw. Perhaps the picture below will help, though you should be able use my initial formula suggestion with UNIQUE, TOCOL and COUNTIF in Excel for MS635.

       

       

      • Officeuser7777's avatar
        Officeuser7777
        Copper Contributor
        Thanks - I bumped this because I am still stumped on how to generate the list in A8..A10 and then count the number of instances of each item in that list across the 3 columns. Sorry, I have long years with Excel, but never got far beyond SUM.

Resources