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![TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Column BM
[/TD]
[TD]Column BN
[/TD]
[TD]Column BO
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Actual Date
[/TD]
[TD] Month
[/TD]
[TD]Month Check
[/TD]
[TD]Result
[/TD]
[/TR]
[TR]
[TD]9/27/2013
[/TD]
[TD]2013-9
[/TD]
[TD]=(LEFT(BM1,1)-RIGHT(BN1,1)=0
[/TD]
[TD]TRUE
[/TD]
[/TR]
[TR]
[TD]10/12/2013
[/TD]
[TD]2013-10
[/TD]
[TD]=(LEFT(BM1,1)-RIGHT(BN1,1)=0
[/TD]
[TD] FALSE
[/TD]
[/TR]
</tbody>[/TABLE]


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
 
Can you post the results of this, and the specific alteration of this formula you are using?

=LEFT(BM2,FIND("/",BM2)-1)=RIGHT(BN2,LEN(BN2)-FIND("-",BN2))
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I just realized I have a typo in the original question, and that must be what is causing your solutions to fail. In column BN, the months are all double integer (09 for September and 10 for October - my example mistakenly shows September with a single integer, 9)!!!
 
Upvote 0
That might explain it...

Try this instead: =VALUE(LEFT(BM2,FIND("/",BM2)-1))=VALUE(RIGHT(BN2,LEN(BN2)-FIND("-",BN2)))
 
Upvote 0
Bingo! That did it! thanks to all of you, and I really am sorry about wasting your time with that typo!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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