mohanprabhus
New Member
- Joined
- Dec 7, 2016
- Messages
- 17
I'm trying to write a VBA CODE example mentioned below. Help on the below-mentioned example
I want my output as mentioned below
Conditions
Overdue means more than 15 days from Current Date
Expired Today Current Date and Expiry Date
Expiring Tomorrow Current Date and Expiry Date
Going to Expiry Current date within 15 days
Advance in Thanks.
A | B | C | D |
SL NO | PRODUCT | MANUFACTURING DATE | EXPIRY DATE |
1 | ABC | 01-01-2021 | 01-01-2022 |
2 | XYZ | 29-03-2021 | 29-03-2022 |
3 | CDA | 04-05-2019 | 04-05-2020 |
4 | TWC | 23-03-2021 | 23-03-2021 |
I want my output as mentioned below
A | B | C | D | E | F |
SL NO | PRODUCT | MANUFACTURING DATE | EXPIRY DATE | CURRENT DATE | STATUS |
1 | ABC | 01-01-2021 | 01-01-2022 | 23-03-2022 | OVERDUE in 81 Days |
2 | XYZ | 29-03-2021 | 29-03-2022 | 23-03-2022 | Going to Expire in Next 6 Days |
3 | CDA | 04-05-2019 | 04-05-2020 | 23-03-2022 | OVERDUE in 688 Days |
4 | TWC | 23-03-2021 | 23-03-2021 | 23-03-2022 | Expiring today |
5 | JSJD | 20-03-2021 | 20-03-2022 | 23-03-2022 | Expired in 3 days |
6 | DDFDFA | 24-03-2021 | 24-03-2022 | 23-03-2022 | Expirining Tomorrow |
Conditions
Overdue means more than 15 days from Current Date
Expired Today Current Date and Expiry Date
Expiring Tomorrow Current Date and Expiry Date
Going to Expiry Current date within 15 days
Advance in Thanks.