+ Reply to Thread
Results 1 to 6 of 6

Excel 2002 date formulas problem

  1. #1
    Andrew Warren
    Guest

    Excel 2002 date formulas problem

    Hi all. I have an Excel spreadsheet which I am having a
    small problem with. The part I am having trouble with
    has 2 columns. The first column is empty and is for
    entering birth dates into. The second column has this
    formula in cell F2 - I have dragged the formula downwards
    from there with the fill handle:

    =IF(MONTH(F2)=MONTH($G$1),"B'day this month","")

    Cell G1 has this formula in it, which gives that cell the
    value of the system date, and displays it in that cell:

    =TODAY()

    The idea is for the text, "B'day this month," to appear
    in the second column if the birthdate entered in the
    first column falls within the month displayed in cell
    G3. It all works if there are dates entered in the first
    column, but if there is no date entered in a cell in the
    first column, then, "B'day this month," is appearing next
    to it.

    I have cell G1 and column F formatted as date category,
    in the type *14/03/2001

    Andy

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    use:
    =IF(AND(ISNUMBER(F2),MONTH(F2)=MONTH($G$1)),"B'day this month","")

    - Mangesh

  3. #3
    Harald Staff
    Guest

    Re: Excel 2002 date formulas problem

    Hi Andy

    It's go away in february <g>
    If you can't wait, try something like
    =IF(AND(MONTH(F2)=MONTH($G$1),F2>1000),"B'day this month","")

    HTH. Best wishes harald


    "Andrew Warren" <[email protected]> skrev i melding
    news:[email protected]...
    > Hi all. I have an Excel spreadsheet which I am having a
    > small problem with. The part I am having trouble with
    > has 2 columns. The first column is empty and is for
    > entering birth dates into. The second column has this
    > formula in cell F2 - I have dragged the formula downwards
    > from there with the fill handle:
    >
    > =IF(MONTH(F2)=MONTH($G$1),"B'day this month","")
    >
    > Cell G1 has this formula in it, which gives that cell the
    > value of the system date, and displays it in that cell:
    >
    > =TODAY()
    >
    > The idea is for the text, "B'day this month," to appear
    > in the second column if the birthdate entered in the
    > first column falls within the month displayed in cell
    > G3. It all works if there are dates entered in the first
    > column, but if there is no date entered in a cell in the
    > first column, then, "B'day this month," is appearing next
    > to it.
    >
    > I have cell G1 and column F formatted as date category,
    > in the type *14/03/2001
    >
    > Andy




  4. #4
    Chris Ferguson
    Guest

    Re: Excel 2002 date formulas problem

    How about testing to see if F2 has a value entered into it before doing the
    calculation?

    something like:-
    =IF(F2<>"",IF(MONTH(F2)=MONTH($G$1),"B'day this month",""),"")

    Chris

    "Andrew Warren" <[email protected]> wrote in message
    news:[email protected]...
    > Hi all. I have an Excel spreadsheet which I am having a
    > small problem with. The part I am having trouble with
    > has 2 columns. The first column is empty and is for
    > entering birth dates into. The second column has this
    > formula in cell F2 - I have dragged the formula downwards
    > from there with the fill handle:
    >
    > =IF(MONTH(F2)=MONTH($G$1),"B'day this month","")
    >
    > Cell G1 has this formula in it, which gives that cell the
    > value of the system date, and displays it in that cell:
    >
    > =TODAY()
    >
    > The idea is for the text, "B'day this month," to appear
    > in the second column if the birthdate entered in the
    > first column falls within the month displayed in cell
    > G3. It all works if there are dates entered in the first
    > column, but if there is no date entered in a cell in the
    > first column, then, "B'day this month," is appearing next
    > to it.
    >
    > I have cell G1 and column F formatted as date category,
    > in the type *14/03/2001
    >
    > Andy




  5. #5
    yaabaa
    Guest

    Re: Excel 2002 date formulas problem

    Thanks very much guys - both of your suggestions seem to work perfectly!!
    Harald, why do you think that my original formula won't work until February?

    "Chris Ferguson" wrote:

    > How about testing to see if F2 has a value entered into it before doing the
    > calculation?
    >
    > something like:-
    > =IF(F2<>"",IF(MONTH(F2)=MONTH($G$1),"B'day this month",""),"")
    >
    > Chris
    >
    > "Andrew Warren" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi all. I have an Excel spreadsheet which I am having a
    > > small problem with. The part I am having trouble with
    > > has 2 columns. The first column is empty and is for
    > > entering birth dates into. The second column has this
    > > formula in cell F2 - I have dragged the formula downwards
    > > from there with the fill handle:
    > >
    > > =IF(MONTH(F2)=MONTH($G$1),"B'day this month","")
    > >
    > > Cell G1 has this formula in it, which gives that cell the
    > > value of the system date, and displays it in that cell:
    > >
    > > =TODAY()
    > >
    > > The idea is for the text, "B'day this month," to appear
    > > in the second column if the birthdate entered in the
    > > first column falls within the month displayed in cell
    > > G3. It all works if there are dates entered in the first
    > > column, but if there is no date entered in a cell in the
    > > first column, then, "B'day this month," is appearing next
    > > to it.
    > >
    > > I have cell G1 and column F formatted as date category,
    > > in the type *14/03/2001
    > >
    > > Andy

    >
    >
    >


  6. #6
    Harald Staff
    Guest

    Re: Excel 2002 date formulas problem

    "yaabaa" <[email protected]> skrev i melding
    news:[email protected]...
    > Thanks very much guys - both of your suggestions seem to work perfectly!!
    > Harald, why do you think that my original formula won't work until

    February?

    Sorry for the typo. I ment to say that the error will go away in february
    all by itself. Month(0) is 1. So
    Month(0) = Month(Date)
    is true only in january.

    HTH. Best wishes Harald



+ 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