+ Reply to Thread
Results 1 to 2 of 2

birthday tracking

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-31-2004
    Posts
    160

    birthday tracking

    VBA Noob:

    I was reading another thread where you helped someone with this code.

    Say date in A1 enter this in B1
    
    =IF(A1=DATE(YEAR(A1),MONTH(TODAY()),DAY(TODAY())), "<<< Birthday today","")
    
    Will display <<< Birthday today if true
    
    for the conditional formating select col and enter
    
    =A1=DATE(YEAR(A1),MONTH(TODAY()),DAY(TODAY()))
    
    VBA Noob
    I tried it and it works great but,

    I would like to do the same thing only have all the birthdays highlight for the
    current month and then copy all the highlighted names and birthdays to a list to be printed and posted on a bulletin board.

    What changes would I need to make to the code to make this work?

    Thanks
    Charles

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,804
    You could use this formula in coditional formatting to highlight all birthdays in the current month

    =MONTH(A1)=MONTH(TODAY())

    So at the moment this would highlight all birthdays in June (including those in the past e.g. 1st June , 2nd June etc.).... or do you only want to highlight future birthdays?

    Note: using VBA Noob's suggestion, if any DOBs are on 29th Feb these will never be highlighted in a non leap year. Perhaps you think this is correct but I presume most people would celebrate this on 28th Feb or 1st March? To make sure all dates are highlighted in all years (29th Feb birthdays on 1st March in non-leap years) amend to

    =TODAY()+1=DATE(YEAR(TODAY()),MONTH(A1),DAY(A1))+1
    Last edited by daddylonglegs; 06-09-2007 at 05:39 PM.

+ 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