How to Sum (Distinct Value Column 1 * the Qty in the same Row) + the Count of distinct in Column1

Options

I am trying to create a formula that will

Sum the (Distinct Value from Column 1* the Qty in the same Row) + the Count of distinct values in Column1 for a total to be calculated in another Sheet next to the Distinct value.

There may be an easier or more straight forward way to do this but I am not sure.

Below is an example of what I am trying to achieve. Please forgive the use of Excel to quickly show what I am trying to achieve.


Here to learn, willing to help!

Best Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓
    Options

    You would first need to use a text/number column (called "Number" in this example) with the numbers 1 through however many distinct entries you think you will need manually entered.

    1

    2

    3

    4

    5

    etc.


    Then in another text/number column (called "List" in this example) you would use the formula:

    =IFERROR(INDEX(DISTINCT(COLLECT({Source Sheet Items Column}, {Source Sheet Items Column}, @cell <> "")), Number@row), "")


    And then in the next column that houses the counts you would use

    =SUMIFS({Source Sheet Qty Column}, {Source Sheet Items Column}, @cell = List@row)

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓
    Options

    For those columns you can use an INDEX/MATCH.

    =INDEX({Reference Sheet Column To Pull}, MATCH([Column To Match On]@row, {Reference Sheet Column TO Match In}, 0))

«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!