Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Matching month part of date only


RGB,

The problem is the MONTH formula will not always be true for the months
in the preceeding years. You can use the day part of the date (make
excel change the day to the first since the actual date is not
important just the month).

=IF(AND(C1=DATE(YEAR($A$2),MONTH($A$2),1),C1<=DAT E(YEAR($B$2),MONTH($B$2),1)),"yes","no")

This makes the date in A2 to = the 1st of July 2006 and in B2 the 1st
of August 2007.


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=561559

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
Date of the First day of the previous month Hari Excel Discussion (Misc queries) 3 May 20th 06 06:49 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
GETTING MONTH FROM A DATE [email protected] Excel Discussion (Misc queries) 8 October 6th 05 01:26 AM
HELP with this function Jay Excel Worksheet Functions 7 May 24th 05 06:45 PM
Lookup the month in a date string 01/03/05 Una Excel Worksheet Functions 1 March 30th 05 09:45 AM


All times are GMT +1. The time now is 04:25 AM.

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"