decent_boy
Board Regular
- Joined
- Dec 5, 2014
- Messages
- 130
- Office Version
- 2016
- Platform
- Windows
I am in Pakistan and I am using format mm/dd/yyyyWhen working with dates, the country in which you are located comes into play. Since I am in Canada, the default date format is "m/d/yyyy". If you are in Europe, the default date format is "d/m/yyyy". In which country are you located?
Start date and end date for each date based on each Number as mentioned below updated resultDo you want the start date and end date for each month based on each Number? Also, I noticed that the zeros in column A are now gone. Are you still using zeros before each Number?
Book8.xlsx | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | Numbers | ID | Date | ||
2 | 12345 | 22 | 1/3/2022 | ||
3 | 12345 | 22 | 1/3/2022 | ||
4 | 12345 | 22 | 1/3/2022 | ||
5 | 12345 | 22 | 1/3/2022 | ||
6 | 12345 | 22 | 1/4/2022 | ||
7 | 12345 | 22 | 1/6/2022 | ||
8 | 12345 | 22 | 1/6/2022 | ||
9 | 12345 | 22 | 1/7/2022 | ||
10 | 12345 | 22 | 4/2/2022 | ||
11 | 12345 | 22 | 4/2/2022 | ||
12 | 12345 | 22 | 4/2/2022 | ||
13 | 12345 | 22 | 4/3/2022 | ||
14 | 12345 | 22 | 4/3/2022 | ||
15 | 12345 | 22 | 4/4/2022 | ||
16 | 23456 | 22 | 1/3/2022 | ||
17 | 23456 | 22 | 1/3/2022 | ||
18 | 23456 | 22 | 1/3/2022 | ||
19 | 23456 | 22 | 1/4/2022 | ||
20 | 23456 | 22 | 1/4/2022 | ||
Data |
Book8.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Number | ID | Start Date | End Date | Days | Working Days | |||
2 | 12345 | 22 | 1/3/2022 | 4/4/2022 | 92 | 64 | Incorrect | ||
3 | 23456 | 22 | 1/3/2022 | 1/4/2022 | 2 | 1 | |||
4 | |||||||||
5 | |||||||||
6 | |||||||||
7 | 12345 | 22 | 1/3/2022 | 1/4/2022 | 2 | 1 | Correct | ||
8 | 12345 | 22 | 1/6/2022 | 1/7/2022 | 2 | 2 | |||
9 | 12345 | 22 | 4/2/2022 | 4/4/2022 | 3 | 0 | |||
Result |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E7:E9,E2:E3 | E2 | =DAYS(D2,C2)+1 |
F7:F9,F2:F3 | F2 | =NETWORKDAYS(C2,D2,Holidays!$B$2:$B$18) |
The start date and end date for 12345 are 01/03/2022 and 01/07/2022. Why do you have three different start dates and ends dates for 12345?
Please find below exact copy of data and required resultI cannot make a suggestion if your data keeps changing. Post an exact copy of your data sheet.
Book8.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | Numbers | ID | Date | Dealer ID | ||
2 | 12345 | 22 | 1/3/2022 | 801 | ||
3 | 12345 | 22 | 1/3/2022 | 803 | ||
4 | 12345 | 22 | 1/3/2022 | 890 | ||
5 | 12345 | 22 | 1/3/2022 | 876 | ||
6 | 12345 | 22 | 1/4/2022 | 852 | ||
7 | 12345 | 22 | 1/6/2022 | 902 | ||
8 | 12345 | 22 | 1/6/2022 | 802 | ||
9 | 12345 | 22 | 1/7/2022 | 875 | ||
10 | 12345 | 22 | 4/2/2022 | 925 | ||
11 | 12345 | 22 | 4/2/2022 | 921 | ||
12 | 12345 | 22 | 4/2/2022 | 821 | ||
13 | 12345 | 22 | 4/3/2022 | 854 | ||
14 | 12345 | 22 | 4/3/2022 | 845 | ||
15 | 12345 | 22 | 4/4/2022 | 980 | ||
16 | 23456 | 22 | 1/3/2022 | 801 | ||
17 | 23456 | 22 | 1/3/2022 | 803 | ||
18 | 23456 | 22 | 1/3/2022 | 890 | ||
19 | 23456 | 22 | 1/4/2022 | 876 | ||
20 | 23456 | 22 | 1/4/2022 | 852 | ||
Data |
Book8.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Number | ID | Start Date | End Date | Days | Working Days | ||
2 | 12345 | 22 | 1/3/2022 | 1/4/2022 | 2 | 1 | ||
3 | 12345 | 22 | 1/6/2022 | 1/7/2022 | 2 | 2 | ||
4 | 12345 | 22 | 4/2/2022 | 4/4/2022 | 3 | 0 | ||
5 | 23456 | 22 | 1/3/2022 | 1/4/2022 | 2 | 1 | ||
Required Result |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:E5 | E2 | =DAYS(D2,C2)+1 |
F2:F5 | F2 | =NETWORKDAYS(C2,D2,Holidays!$B$2:$B$18) |
I don't see either ID in your data sheet or result sheet. Again, I ask: Why do you have three different start dates and ends dates for 12345? I have spent some time trying to help you. If you cannot post data that reflects all possible variations of Number and ID, then perhaps someone else on the Forum will be able to help you.Like number 12345 dealer ID 801, 12345 dealer ID 803