Text

DDH

Well-known Member
Joined
Sep 25, 2003
Messages
513
IFERROR(IF(MONTH(A32)<>MONTH(A33),TEXT(A32,"m"),""),TEXT(A32,"M))

This formula will return "11" (numerical month)

I am trying to have it produce "N" a text month,
I know "MMM" will return "NOV"

I thought that logicaly this should work but it does
not.
Thank you for your help.


IFERROR(IF(MONTH(A32)<>MONTH(A33),(A32,"m"),""),(A32,"M))
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
niceguy_jay - Thank you for your help.
I change it to
CHOOSE(IFERROR(IF(MONTH(A3)<>MONTH(A4),MONTH(A3),MONTH(A3)),TEXT(A3,"m")),"J","F","M","A","M","J","J","A","S","O","N","D")

but the ISERROR is gone and how would it handle the "J" for June and
"J" for July.
 
Upvote 0
it is working fine...your modified formula...I am getting J for June and J for July as well..
what error you are getting ??
 
Upvote 0
niceguy_jay - Thank you for your help

IFERROR(IF(MONTH(A32)<>MONTH(A33),TEXT(A32,"m"),""),TEXT(A32,"M))

The )'"") is missing

I tried to add it, but it gives me an error.

choose(iferror(if(month(a32)<>month(a33),month(a32),month(a32)),text(a32,"m"),""),"jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")
 
Upvote 0
How do you differentiate between:
January (J) June (J) and July (J) and also March (M) and May (M) ?
 
Upvote 0
SuperFerret - I agree that is my question along with the other one I asked.
I don't think Excel could tell the difference between Jun and Jul.

I just thought I would ask to see if it was possible.
Thank you for your help.
 
Upvote 0
I have modified the formula to accommodate your requirement...can you check this..

=IFERROR(CHOOSE(IFERROR(IF(MONTH(A3)<>MONTH(A4),MONTH(A3),""),TEXT(A3,"m")),"J","F","M","A","M","J","J","A","S","O","N","D"),"")
 
Upvote 0
niceguy_jay - Thank you for your help.

It works perfect.
I was looking at the normal text formula.

10/15/11 to return "October" Formula -- TEXT(O34,"mmmm")
To return the day --"Wednesday" Formula --- TEXT(O34,"dddd")

I was just trying to see if I could get it to do the same thing
and return just "O" or "W" by only having one "M" and one "D".
It did not work.
I would have thought it would have worked the same as in
the other formula.
Thanks again for your help.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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