Comparing date cells and blanks

cmcordova

New Member
Joined
Mar 14, 2023
Messages
13
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
  2. Web
Hello all!

I am trying to compare values in G2 and H2 based on the below criteria:
  • Both are date fields
  • If G2>H2 then "Sales Initiated"
  • If G2<H2 then "Marketing Initiated"
  • If G2=H2 then "Marketing Initiated"
  • If G2 is blank, but H2 is not, then "Sales Initiated"
  • If G2 is not blank, but H2 is blank, then "Marketing Initiated"
  • If both G2 and H2 are blank, then ""

I started with the below formula, but it doesn't take into consideration if one cell is blank and not the other or if they are the same. Any help is greatly appreciated!
=IF(AND(ISBLANK(G2), ISBLANK(H2)),"",IF(G2>H2), "Sales_Initiated", "Marketing_Initiated"))
 
Thank you so much, @Fluff! I repurpsed what you sent for some other columns with the same logic. (Pardon me. I got G2 and H2 mixed up above, but was able to correct my mistake using your formula)

If K36, L36 or M36 are blank then = Sales Initiated
If K36 is before either L36 or M36 then = Marketing Intitiated
otherwise Sales Initiated

From what I see, your formula should work, but as you see below, it's labled row 36 incorrectly, and I can't figure out why.

1679079295829.png
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
K36 = M36 so that appears to be working fine.
 
Upvote 0
But K36 is after L36, so it should be Sales Initiated. If K36 is before either L36 or M36 then it's Marketing Inititiated, but if either of the Sales dates (L36 and M36) are before the marketing date (K36) then it's Sales Initiated.

I really do appreciate all of your help! I'm learning a ton!
 
Upvote 0
Missed that. Check that those dates are real dates & not text.
 
Upvote 0
If you change the format of all those cells to General what do you see?
 
Upvote 0
That's fine, they are real dates.
The formula is saying that if K is less then or equal to either L or M & it is equal to M hence the result.
 
Upvote 0
Thanks, @Fluff ! I have so much to learn. LOL! I'm still confused. L36 is less than K36, so in my mind it should be Sales Initiated (which is what we want) but I am still not clear as to why it is showing a result of Marketing Initiated.
 
Upvote 0
Because you have an OR K36 <= M36 which returns true, so the fact that K36 > L36 is irrelevant.
 
Upvote 0

Forum statistics

Threads
1,215,945
Messages
6,127,844
Members
449,411
Latest member
adunn_23

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