crhoftender

New Member
Joined
Mar 11, 2014
Messages
2
I need some help with an IF statement. I am checking a code vs another code cell. The appears ###/####. What I want the formula to check if the referencing cell is <= to other, and then return one of the respective text strings I enter for true and false. I believe the issue I am having is the '/' that is part of the code. I need it to check both sides of the '/'.

Is this possible? The codes are dates so Jan, 2014 would be 001/2014.

To further complicate this - there will be a large portion that would a text string that would require a value to be returned
 
Last edited:

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi, and welcome.

I'm not entirely clear exactly what you're after, but this could be a starting point for you:

Cells A1 and B1 contain strings formatted as ###/#### which are to be compared.

The following formula will convert the strings to datevalues for easy comparison:

Code:
=IF(DATEVALUE(RIGHT(A1,4)&"-"&MID(A1,2,2)&"-01")<=DATEVALUE(RIGHT(B1,4)&"-"&MID(B1,2,2)&"-01"),"A1<=B1","A1>B1")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,013
Messages
6,122,690
Members
449,092
Latest member
snoom82

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