Forum Discussion
Compare for time and count in cells for days
To create a table that calculates the total count of days for each assigned group based on the creation date, and then categorizes them into different time frames (e.g., last 3 days, last 5 days, etc.), you can follow these steps:
- Calculate Total Days for Each Assigned Group:
- Use the TODAY() function to get today's date.
- Subtract the creation date from today's date to get the total number of days.
- Use conditional formulas to categorize the total days into different time frames.
- Create a Table Structure:
- Create column headers for each time frame (e.g., <1 Days, <2 Days, etc.).
- Create rows for each assigned group.
- Calculate the total count for each time frame for each assigned group.
Here's how you can apply the formulas:
Assuming your data starts from cell A1 with headers "Assigned_Group" in column A and "Creation_Date" in column B, and the first row of data starts from row 2:
- In cell C2, enter the formula to calculate the total number of days for each assigned group:
=TODAY() - B2
- Drag this formula down to fill the cells in column C for all rows of data.
- In cells D2 onwards, you can use conditional formulas to categorize the total days into different time frames. For example:
- For "<1 Days":
=IF(C2 < 1, 1, "")
- For "<2 Days":
=IF(AND(C2 >= 1, C2 < 2), 1, "")
- For ">5 Days":
=IF(C2 > 5, 1, "")
- Repeat similar formulas for other time frames ("<7 Days", ">7 Days", etc.) as needed.
- To calculate the total count for each assigned group in each time frame, you can use the COUNTIFS function. For example, for "<1 Days", the formula would be:
=COUNTIFS(A:A, "Mohit", D:D, 1)
- Repeat the COUNTIFS formula for each time frame and for each assigned group.
- Finally, calculate the Grand Total for each time frame by summing up the counts for all assigned groups.
- Adjust the cell references and formulas as needed based on the actual location of your data in the worksheet.
Once you set up these formulas, the table will dynamically update whenever the creation date or today's date changes, providing you with the count of days for each assigned group in different time frames.The text was created with the help of AI.
If this is not what you are looking for, please provide additional information as Mr. Hans Vogelaar recommended.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.