Forum Discussion

EmilyDyer's avatar
EmilyDyer
Copper Contributor
Oct 09, 2024

formatting and equations

Hi! I am hoping to make my work a little easier.  I have an excel worksheet I am using to get data from but in order to do I am needing to do a lot of steps.    Here is an example of my worksheet, there is additional info in the other boxes but not relevant to my work.  

 

I am trying to figure out the percentage of how many numbers on the right are under 180. 

 

This is what I am doing now...

I am inserting 2 rows after each change in number in the first box, then copying and pasting under the column on the right an equation but each time have to remember what the starting number is for that group of rows.  Here is the equation I am pasting =COUNTIFS(J2:J17,">69",J2:J17,"<181") and =COUNT(J16487:J16672)   It knows the last one is the one above but now where it started.  Is there a way to automatically insert this empty rows between and a better way or automatic way to do my equation?  

 

Help me find an easier way!  My worksheet has 29247 rows, so many lines to go through and the groups of each number (on the right) vary from 40-600s, 

3333    90 
3333    80 
333    110 
444    170 
444    123 
444    90 
444    190 
6666    200 
6666    150 
666    176 
666    88 
666    90 
777    67 
777    180 
777    150 
777    111 
777    123 
777    125 
777    135 
777    150 
       

1 Reply

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor

    EmilyDyer I think this can be done using a pivot table.

     

    1. Make sure your data has a row with unique headings. Then press control+T to format the range as a table (check the "My table has headings" check-box).
    2. Click Insert, Pivot table
    3. Drag the category column to the Rows area
    4. Drag the column with the numbers to the rows area
    5. Right-click that last added column in your pivot table and choose "Group". Set it to this:

       

    6. Drag that same field into the Values area
    7. Right-click inside that area in the pivot table and choose "Show Values As", "% of parent row total".

    I end up with this: