IF Statement help

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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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