Formulas Based on Differences between months, as text?

mnty89

Board Regular
Joined
Apr 1, 2016
Messages
66
Hey so I cannot find the solution nor figure this out for some frustrating reason..

I have two columns that are Months. They have the month names spelled out fully. One is the original, the next is the adjusted. I want to say if the first month is later than the second, "Pulled In" if the first month is earlier than the second, "Pushed Out", if they are the same then blank "".

Examples of the data and intended outcomes below. It seems like it's reading these incorrectly since the months are coming out as texts of months..

Example Data

[TABLE="width: 281"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]MonthOLD[/TD]
[TD]MonthNEW[/TD]
[TD]Monthly_Shift[/TD]
[/TR]
[TR]
[TD]August[/TD]
[TD]August[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]September[/TD]
[TD]August[/TD]
[TD]Pulled_In[/TD]
[/TR]
[TR]
[TD]August[/TD]
[TD]September[/TD]
[TD]Pushed_Out[/TD]
[/TR]
[TR]
[TD]July[/TD]
[TD]August[/TD]
[TD]Pushed_Out[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
If anyone ever needs this in the future I figured it out, basically need to convert the month text into a date value number to do a comparison with something like-

=IF(MONTH(DATEVALUE([MonthOLD]&" 1"))>MONTH(DATEVALUE([MonthNEW]&" 1")),"Pulled_In",IF(MONTH(DATEVALUE([MonthNEW]&" 1"))>MONTH(DATEVALUE([MonthOLD]&" 1")),"Pushed_Out",""))
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,139
Members
453,021
Latest member
Justyna P

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