TEXT(MONTH(TODAY()),"mmm") returns Jan

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
This will give you:
= TEXT(TODAY(),"mmm")
 
Upvote 0
this formula is returning 'Jan'
should be 'Jul', right?
?
No, because MONTH(TODAY)) is 7, and the Excel date serial 7 - the 7th day after 1/1/1900 - is in January.
 
Upvote 0
ok, understood.
what i need is to get the previous month out of this:

=MATCH("*"&TEXT(NOW(),"mmm") &"*",A4:HZ4,0)

i.e., so i am looking for the beginning of the Jun columns and the cell has:

06/01/11 - Jun-11

can't use numbers because e.g., 11 (Nov) will pick up this month:

01/01/11 - Jan-11
 
Upvote 0
think i got it

=MATCH("*"&TEXT(NOW()-35,"mmm") &"*",A4:HZ4,0)

so wherever i am in the current month, the '-35' will put me in the previous month.
that's all i could think of.
 
Upvote 0
OK, so you're trying to get the previous month..

So instead of NOW, you want a date from LAST month?
=MATCH("*"&TEXT(NOW(),"mmm") &"*",A4:HZ4,0)


Try
=MATCH("*"&TEXT(TODAY()-DAY(TODAY()),"mmm") &"*",A4:HZ4,0)

TODAY()-DAY(TODAY()) = last day of last month.
 
Upvote 0
think i got it

=MATCH("*"&TEXT(NOW()-35,"mmm") &"*",A4:HZ4,0)

so wherever i am in the current month, the '-35' will put me in the previous month.
that's all i could think of.
For the previous month try this...

=MATCH("*"&TEXT(NOW()-DAY(NOW()),"mmm")&"*",A4:HZ4,0)
 
Upvote 0
that works.

maybe you can take a look here:
http://www.mrexcel.com/forum/showthread.php?t=566959

this is what i am working on.
and using the 'Flash' report:

=IF(ISNA(VLOOKUP($A2&"*",'[Flash Report FY11.xlsx]report'!$F$4:$HZ$500,151,FALSE)),"NA",IF(VLOOKUP($A2&"*",'[Flash Report FY11.xlsx]report'!$F$ 4:$HZ$500,151,FALSE)=0,L2,VLOOKUP($A2&"*",'[Flash Report FY11.xlsx]report'!$F$4:$HZ$500,151,FALSE)))

of course the value '151' needs to be replaced with something but that is 13 columns over from the start of the June data. and the final VLOOKUP would subtract June from May which is 4 columns to the left of June.

much obliged.
 
Upvote 0

Forum statistics

Threads
1,215,807
Messages
6,127,002
Members
449,351
Latest member
Sylvine

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