Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kurt
 
Posts: n/a
Default How do I extract just the month

Hi out there,

I'm reading in a group of tables that have Jun-2005, Jul-2005, etc and I
want to locate the table that matches the current month. I have in cell A1
the today() function and I format the cell to be in mmm-yyyy.

but the format only changes the cells appearance not the actual value. it
still 6/30/2005 and the tables are 6/1/2005, 7/1/2005 etc.

So everytime i use IF() or write VBA I can't get it to work.

Thanks for anyhelp!!!

Regards, Kurt
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

=Month(A1) should get you the month value.
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"kurt" wrote in message
...
Hi out there,

I'm reading in a group of tables that have Jun-2005, Jul-2005, etc and I
want to locate the table that matches the current month. I have in cell A1
the today() function and I format the cell to be in mmm-yyyy.

but the format only changes the cells appearance not the actual value. it
still 6/30/2005 and the tables are 6/1/2005, 7/1/2005 etc.

So everytime i use IF() or write VBA I can't get it to work.

Thanks for anyhelp!!!

Regards, Kurt



  #3   Report Post  
Anne Troy
 
Posts: n/a
Default

By the way, =Month(a1) will return the NUMBER of the month. January = 1,
February = 2, etc.
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"kurt" wrote in message
...
Hi out there,

I'm reading in a group of tables that have Jun-2005, Jul-2005, etc and I
want to locate the table that matches the current month. I have in cell A1
the today() function and I format the cell to be in mmm-yyyy.

but the format only changes the cells appearance not the actual value. it
still 6/30/2005 and the tables are 6/1/2005, 7/1/2005 etc.

So everytime i use IF() or write VBA I can't get it to work.

Thanks for anyhelp!!!

Regards, Kurt



  #4   Report Post  
Niek Otten
 
Posts: n/a
Default

If you prefer text, use

=TEXT(A1,"mmmm")

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"Anne Troy" wrote in message
news:d3c6e$42c5a397$97c5108d$15062@allthenewsgroup s.com...
By the way, =Month(a1) will return the NUMBER of the month. January = 1,
February = 2, etc.
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"kurt" wrote in message
...
Hi out there,

I'm reading in a group of tables that have Jun-2005, Jul-2005, etc and I
want to locate the table that matches the current month. I have in cell
A1
the today() function and I format the cell to be in mmm-yyyy.

but the format only changes the cells appearance not the actual value. it
still 6/30/2005 and the tables are 6/1/2005, 7/1/2005 etc.

So everytime i use IF() or write VBA I can't get it to work.

Thanks for anyhelp!!!

Regards, Kurt





  #5   Report Post  
bj
 
Posts: n/a
Default

try
=eomonth(today(),-1)+1
this will give you the first day of the current month

"kurt" wrote:

Hi out there,

I'm reading in a group of tables that have Jun-2005, Jul-2005, etc and I
want to locate the table that matches the current month. I have in cell A1
the today() function and I format the cell to be in mmm-yyyy.

but the format only changes the cells appearance not the actual value. it
still 6/30/2005 and the tables are 6/1/2005, 7/1/2005 etc.

So everytime i use IF() or write VBA I can't get it to work.

Thanks for anyhelp!!!

Regards, Kurt



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP - need to returns the current number of past month this year and ... elz64 Excel Worksheet Functions 6 April 6th 05 01:37 PM
Add one month to the previuos month heater Excel Discussion (Misc queries) 5 February 10th 05 12:33 AM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM
Accounting Month vs. Calendar Month JN Excel Worksheet Functions 4 January 31st 05 08:09 PM
How to extract month number from month name PM Excel Discussion (Misc queries) 2 January 19th 05 03:07 PM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"