Edate based on 3 date variables

davids4500

New Member
Joined
Jan 14, 2023
Messages
44
Office Version
  1. 365
Platform
  1. Windows
Hi everybody..
I have an excel spreadsheet as attached.
three columns have dates A1 which is todays date, H3 is the second date and J3 is the third date.
I need a formula that applies these 3 criteria:- If J3 = 0, and H3 = zero then P3 =EDATE(A1, O3), but if J3 = 0 and H3 has a date then P3 = EDATE(H3, O3), but if J3 has a date (and H3 may also have a date) then P3 =EDATE(J3, O3)
 

Attachments

  • ScreenshotExcel 2024-09-17 153547.jpg
    ScreenshotExcel 2024-09-17 153547.jpg
    208.9 KB · Views: 5
You're welcome. Glad we could help.
PS: The fact that Round fixed it, indicates that the 8 in column O is not exactly 8 where it is even something like 7.99999 it will cause edate to only advance by 7 months.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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