Date Comparison

SWLee

New Member
Joined
Oct 17, 2013
Messages
11
I need a formula that works for both two digit and 1 digit months. I add multiple records at a time, and the actual date can vary widely. I can use one formula and then make corrections, but would like something that works wither way. Thanks in advance!
Column BM
Column BN
Column BO
Actual Date
Month
Month Check
Result
9/27/2013
2013-9
=(LEFT(BM1,1)-RIGHT(BN1,1)=0
TRUE
10/12/2013
2013-10
=(LEFT(BM1,1)-RIGHT(BN1,1)=0
FALSE

<tbody>
</tbody>


The date in Column BM is populated by a formula referring to a cell in a query - I can't modify it - always returns the 1st 9 months as a single integer and the last 3 months as a double integer
The date in Column BN is manually populated

This is used to error check the manual entries in column BN
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Looks like it will work, I'll check it out at work in the morning and let you know. THANKS for the quick response.
 
Upvote 0
try:
=MONTH(BM2)=MID(BN2,FIND("-",BN2)+1,2)*1

If I'm not mistaken, column BM is text (otherwise op's LEFT function posted above would not work). Thus you would either need to combine that MONTH function with a VALUE, or else treat column BM as text.
 
Upvote 0
Sorry to take this long to get back to you. A lot going on in my world right now. I tried both of the suggested solutions, and neither one works when they hit double integer in the date. And bschwartz is absolutely correct the column BM is text. It refers to a cell in the query and I haven't been able to convert it to a date.
 
Upvote 0
Try this...
=if(find("/",bm1)=2,left(bm1,1),left(bm1,2))=if(len(bn1)=6,right(bn1,1),right(bn1,2))



and bschwartz is absolutely correct the column bm is text. It refers to a cell in the query and i haven't been able to convert it to a date.
 
Upvote 0
Strange, it works for me... Can you post the data and the results, and the specific formulas you tried?
 
Upvote 0
HI SWLee
Try this on Column BO
=IF(FIND("/",A1,1)=2,LEFT(A1,1),LEFT(A1,2))=(TRIM(MID(B1,FIND("-",B1,1)+1,10)))
but before you do, make sure that the cell you put it in, is formatted as general, hopefully that should resolve the issue
 
Upvote 0
Hmm, I get a result of "FALSE" for all my dates in September and "TRUE" for all my dates in October. Let me study this a bit. - this was mfexcel's formula that I tried
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,742
Members
448,989
Latest member
mariah3

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