Forum Discussion

Young_Grasshopper_EIT's avatar
Young_Grasshopper_EIT
Copper Contributor
Jul 14, 2023
Solved

Help Counting Cells with Numbers and Text without counting duplicates.

Currently I am reading through this table (first picture) and generating this table (second picture)

My issue is that I have to manually search through the first table and manually input "8"MAPLE","9"MAPLE","10"MAPLE"  into the second table. Is there a way for excel to read through the first table (the first picture) find all the different size trees and then generate the second table (picture 2) without having to manually read through the first table and manually insert all different sizes for the trees?

  • mtarler's avatar
    mtarler
    Silver Contributor
    yes. if you supply a sample file we can more easily show you but basically:
    =UNIQUE(Table1[Raw Description])
    then you can use COUNTIF for the counts
    Alternatively you can use the built in PivotTable to do this also.
    • Young_Grasshopper_EIT's avatar
      Young_Grasshopper_EIT
      Copper Contributor
      Thank you for your quick reply! Here is the sample file! The large set of data at the top of the file will be different every time. I am trying to create a template file. Every time I need to use this file I will copy and paste that first table from another program. I then want to figure out how to pull the information needed to generate the tables seen on the "Protected Tree Total" sheet . I want to make the file as dynamic as possible so anybody can open it, copy and paste the first large table, and it will give them all the subsequent tables on sheet 2.
      • mtarler's avatar
        mtarler
        Silver Contributor
        the file wasn't attached. If you can't attach it maybe upload and send link to it in Sharepoint, Onedrive, or similar.
        In either case I recommend you make the first table 'Format as a Table' and then either the PivotTable or the formulas can reference that table by name and not worry about exactly how many rows of data there are.

Resources