Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Brian
 
Posts: n/a
Default Pulling a date in the current month

What I am trying to do is get my excel SS to pull any dates within the
current month for payments. I would likethe cell to say something like "if
cell A1 is in this month, display the date in B2, otherwise take the date
from B3".
I have come up with =IF(A1=DATE(YEAR(NOW()),MONTH(NOW()),),B2,B3), but I am
obviously having a problem without a day entered, it always gives the date in
B3. Any help would be appreciated. thx.
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default Pulling a date in the current month

One way

=IF(MONTH(A1)=MONTH(TODAY()),B2,B3)


If you want to test for years as well

=IF(DATE(YEAR(A1),MONTH(A1),DAY(TODAY()))=TODAY(), B2,B3)


--

Regards,

Peo Sjoblom

"Brian" wrote in message
...
What I am trying to do is get my excel SS to pull any dates within the
current month for payments. I would likethe cell to say something like "if
cell A1 is in this month, display the date in B2, otherwise take the date
from B3".
I have come up with =IF(A1=DATE(YEAR(NOW()),MONTH(NOW()),),B2,B3), but I

am
obviously having a problem without a day entered, it always gives the date

in
B3. Any help would be appreciated. thx.



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default Pulling a date in the current month

One mo

=IF(text(a1,"yyyymm")=text(TODAY(),"yyyymm"),B2,B3 )

Brian wrote:

What I am trying to do is get my excel SS to pull any dates within the
current month for payments. I would likethe cell to say something like "if
cell A1 is in this month, display the date in B2, otherwise take the date
from B3".
I have come up with =IF(A1=DATE(YEAR(NOW()),MONTH(NOW()),),B2,B3), but I am
obviously having a problem without a day entered, it always gives the date in
B3. Any help would be appreciated. thx.


--

Dave Peterson
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
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
How do I break a date range by month? HeatherDawn Excel Discussion (Misc queries) 2 September 1st 05 07:31 PM
Formula for current month minus one = Quarter number in a macro. Pank Excel Discussion (Misc queries) 11 June 22nd 05 02:47 PM
Month Year Date Format Jamie Excel Worksheet Functions 2 February 7th 05 06:43 PM
Return the end of month date from a date Steve F. Excel Worksheet Functions 3 October 28th 04 06:17 PM


All times are GMT +1. The time now is 08:43 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"