+ Reply to Thread
Results 1 to 6 of 6

last day of the month in a range

  1. #1
    Registered User
    Join Date
    02-25-2005
    Posts
    38

    last day of the month in a range

    in column A there are dates like

    01/15/2004
    01/25/2004
    02/03/2004
    16/03/2004
    .
    .
    .

    how can i a macro so that it gives the last days of that month like

    01/25/2004
    16/03/2004

    thanks in advance

  2. #2
    Nigel
    Guest

    Re: last day of the month in a range

    Not sure what the question is but if you use =MAX(a1:a4) it will return the
    last date of range. But I suspect this is not want you want?

    --
    Cheers
    Nigel



    "barkiny" <[email protected]> wrote in
    message news:[email protected]...
    >
    > in column A there are dates like
    >
    > 01/15/2004
    > 01/25/2004
    > 02/03/2004
    > 16/03/2004




  3. #3
    Ron de Bruin
    Guest

    Re: last day of the month in a range

    Hi

    Which month
    All ?

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "barkiny" <[email protected]> wrote in message
    news:[email protected]...
    >
    > in column A there are dates like
    >
    > 01/15/2004
    > 01/25/2004
    > 02/03/2004
    > 16/03/2004




  4. #4
    Registered User
    Join Date
    02-25-2005
    Posts
    38
    yes
    for each motnth

    it will return

    01/25/2004 in cell A1 and 16/03/2004 in cell A2

  5. #5
    Ron de Bruin
    Guest

    Re: last day of the month in a range

    Mmmmm

    I have a solution but I think it is not very good
    I send a mail to a friend that have more knowledge then I about this.

    I hope he reply


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "barkiny" <[email protected]> wrote in message
    news:[email protected]...
    >
    > yes
    > for each motnth
    >
    > it will return
    >
    > 01/25/2004 in cell A1 and 16/03/2004 in cell A2
    >
    >
    > --
    > barkiny
    > ------------------------------------------------------------------------
    > barkiny's Profile: http://www.excelforum.com/member.php...o&userid=20397
    > View this thread: http://www.excelforum.com/showthread...hreadid=490715
    >




  6. #6
    Ron de Bruin
    Guest

    Re: last day of the month in a range

    Hi barkiny

    Much better this solution from Bob Phillips

    Assuming that the dates are in A1:A200, add this formula to B1

    =IF(MAX(IF((MONTH($A$1:$A$200)=ROW(A1))*($A$1:$A$200<>""),$A$1:$A$200))=0,"",MAX(IF((MONTH($A$1:$A$200)=ROW(A1))*($A$1:$A$200<>""),$A$1:$A$200)))

    It is an array formula, so it needs to be committed with Ctrl-Shift-Enter.
    You will see the formula in the formula bar surrounded by {...}, which are
    inserted by Excel. Then copy B1 down to B12.

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Ron de Bruin" <[email protected]> wrote in message news:O5pjiCm%[email protected]...
    > Mmmmm
    >
    > I have a solution but I think it is not very good
    > I send a mail to a friend that have more knowledge then I about this.
    >
    > I hope he reply
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    > "barkiny" <[email protected]> wrote in message
    > news:[email protected]...
    >>
    >> yes
    >> for each motnth
    >>
    >> it will return
    >>
    >> 01/25/2004 in cell A1 and 16/03/2004 in cell A2
    >>
    >>
    >> --
    >> barkiny
    >> ------------------------------------------------------------------------
    >> barkiny's Profile: http://www.excelforum.com/member.php...o&userid=20397
    >> View this thread: http://www.excelforum.com/showthread...hreadid=490715
    >>

    >
    >




+ 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