If criteria is met, add 2 years, if not, add 1

FV_64

New Member
Joined
Jun 22, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello and Good Morning (or Good Afternoon :))

I need help with inserting a formula in Column D (New Date), that adds 2 years to End date (Column C) when the type = Physician (column A) and adds 1 year to the End date (column C) for all other types in the new column.

Help would be appreciated.
 

Attachments

  • CaptureSample.JPG
    CaptureSample.JPG
    78.5 KB · Views: 8
Hi, here's one option you can try:
Book5
ABCD
1TypeEffEndNew Date
2NON-EMERGENCY MEDICAL TRANSPORTATION01/19/202201/19/202501/19/2026
3NON-EMERGENCY MEDICAL TRANSPORTATION05/05/202105/05/202405/05/2025
4OPTOMETRIST02/26/202102/26/202402/26/2025
5PHYSICIAN04/12/202104/12/202404/12/2026
6PHYSICIAN12/23/202012/23/202312/23/2025
7PHYSICIAN07/21/202007/21/202307/21/2025
8PHYSICIAN02/22/202302/22/202802/22/2028
9PHYSICIAN02/22/202302/22/202802/22/2028
10PHYSICIAN02/22/202302/22/202802/22/2028
11URGENT CARE CENTER07/03/202007/03/202307/03/2024
12PHYSICIAN12/28/202112/28/202412/28/2026
13PHYSICIAN12/28/202112/28/202412/28/2026
14DENTIST03/01/202103/01/202403/01/2025
15OPTOMETRIST09/25/202009/25/202309/25/2024
16PSYCHOLOGIST09/25/202009/25/202309/25/2024
17MULTI-DISCIPLINARY GROUP05/06/202105/06/202405/06/2025
18PHYSICIAN12/16/202212/16/202512/16/2027
19PHYSICIAN GROUP05/26/202005/26/202305/26/2024
Sheet1
Cell Formulas
RangeFormula
D2:D19D2=IF(TRIM(A2)="PHYSICIAN",IF(EDATE(B2,60)=C2,C2,EDATE(C2,24)),EDATE(C2,12))
 
Upvote 0
Solution

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi, here's one option you can try:
Book5
ABCD
1TypeEffEndNew Date
2NON-EMERGENCY MEDICAL TRANSPORTATION01/19/202201/19/202501/19/2026
3NON-EMERGENCY MEDICAL TRANSPORTATION05/05/202105/05/202405/05/2025
4OPTOMETRIST02/26/202102/26/202402/26/2025
5PHYSICIAN04/12/202104/12/202404/12/2026
6PHYSICIAN12/23/202012/23/202312/23/2025
7PHYSICIAN07/21/202007/21/202307/21/2025
8PHYSICIAN02/22/202302/22/202802/22/2028
9PHYSICIAN02/22/202302/22/202802/22/2028
10PHYSICIAN02/22/202302/22/202802/22/2028
11URGENT CARE CENTER07/03/202007/03/202307/03/2024
12PHYSICIAN12/28/202112/28/202412/28/2026
13PHYSICIAN12/28/202112/28/202412/28/2026
14DENTIST03/01/202103/01/202403/01/2025
15OPTOMETRIST09/25/202009/25/202309/25/2024
16PSYCHOLOGIST09/25/202009/25/202309/25/2024
17MULTI-DISCIPLINARY GROUP05/06/202105/06/202405/06/2025
18PHYSICIAN12/16/202212/16/202512/16/2027
19PHYSICIAN GROUP05/26/202005/26/202305/26/2024
Sheet1
Cell Formulas
RangeFormula
D2:D19D2=IF(TRIM(A2)="PHYSICIAN",IF(EDATE(B2,60)=C2,C2,EDATE(C2,24)),EDATE(C2,12))
This worked. Thanks again so much.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top