+ Reply to Thread
Results 1 to 3 of 3

Pulling a date in the current month

Hybrid View

Guest Pulling a date in the current... 10-24-2005, 12:05 PM
Guest Re: Pulling a date in the... 10-24-2005, 12:05 PM
Guest Re: Pulling a date in the... 10-24-2005, 01:05 PM
  1. #1
    Brian
    Guest

    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. #2
    Peo Sjoblom
    Guest

    Re: 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" <Brian@discussions.microsoft.com> wrote in message
    news:84700D39-9EEF-4F9B-BEC8-688BBF652BED@microsoft.com...
    > 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. #3
    Dave Peterson
    Guest

    Re: Pulling a date in the current month

    One more:

    =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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1