Hello, I have two tables one with data and the other a summary of the data.
The data table includes in column A a code for a week of the year (202101, for example for year 2021 and week 01), column B the name of workers, and column C the absences in the workweek.
The summary table finds the combination of name+weekcode and if there is data (0 means the person came to work every day), it returns the number of absences for the week, that way we can see each worker's absenteeism by week. If there is no data (if the worker didn't come any day) a "n/a" (not applicable) appears. The formula for B2 in the summary table for example is:
I am having difficulty sorting in the summary table by number of absences, so we can see who failed to show up the most and design policies in order to lower absenteeism. You can see in the attached picture, the column for week 202052 is arranged in order, yet they do not appear in order from "n/a" for example to 6-5-4-3-2-1 and finally 0.
Also, I would prefer for "n/a" to appear under "0", but this is secondary.
All cells in the summary are formatted for "numbers".
I have attached pictures of both tables.
Thanks!
The data table includes in column A a code for a week of the year (202101, for example for year 2021 and week 01), column B the name of workers, and column C the absences in the workweek.
The summary table finds the combination of name+weekcode and if there is data (0 means the person came to work every day), it returns the number of absences for the week, that way we can see each worker's absenteeism by week. If there is no data (if the worker didn't come any day) a "n/a" (not applicable) appears. The formula for B2 in the summary table for example is:
=IF(COUNTIFS(Data!$A:$A,Summary!B$1,Data!$B:$B,Summary!$A2)=0,"n/a",ADDIFS(Data!$C:$C,Data!$A:$A,Summary!B$1,Data!$B:$B,Summary!$A2))
I am having difficulty sorting in the summary table by number of absences, so we can see who failed to show up the most and design policies in order to lower absenteeism. You can see in the attached picture, the column for week 202052 is arranged in order, yet they do not appear in order from "n/a" for example to 6-5-4-3-2-1 and finally 0.
Also, I would prefer for "n/a" to appear under "0", but this is secondary.
All cells in the summary are formatted for "numbers".
I have attached pictures of both tables.
Thanks!