Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Public holiday formula (Excel 2000/2003)

    I have a list of public holidays.
    I have a column of dates for the month.
    What I want in a seperate column next to the date is a formula that will have a look at the date, compare it to the list of public holidays and enter "Public Holiday" into the cell if the date is equal to a date in the public holiday range, otherwise "".
    Any suggestions, please
    Regards

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Public holiday formula (Excel 2000/2003)

    Say that your holidays are in A2:A30, and say that your dates are in column C, starting at C2.
    In cell D2, enter the following formula:

    <code>=IF(COUNTIF($A$2:$A$30,C2),"Public Holiday","")</code>

    and fill down as far as needed. You can also give the range with holidays a name (Insert | Name | Define...), and use this name instead of $A$2:$A$30.

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Smithfield, Free State, South Africa
    Posts
    210
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Public holiday formula (Excel 2000/2003)

    Thanks again, Hans

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Public holiday formula (Excel 2000/2003)

    An alternative version:

    <code>
    =IF(ISNA(MATCH(C2,$A$2:$A$30,0)),"","Public Holiday")</code>

Posting Permissions

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