show list of people with birthdays within a week of today

muizac

Board Regular
Joined
Oct 24, 2006
Messages
50
Hello,

Hope you had a lovely Easter.

I have a worksheet of customers; Column N has DOB, and Column Y has their birthday date this year. Is there a macro that can show a list of all upcoming birthdays (<8 days from today's date) in another worksheet?

Thanks
Andrew
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Hey Andrew
In column Z try this and copy down as far as needed
Code:
=IF(TODAY()-Y1<8," Birthday coming Up","")
or for reference to another sheet
Code:
=IF(TODAY()-Sheet1!Y2<8," Birthday coming Up","")
 
Upvote 0
You can use this macro. You will have to insert a new Sheet called birthday and insert the correct range.

Code:
Sub Brithday()
Dim rngBirthday As Range
Dim rngCell As Range
Dim Count As Long

Set rngBirthday = Sheet1.Range("B14:B96")

For Each rngCell In rngBirthday
If rngCell > DateAdd("d", 0, Date) And rngCell < DateAdd("d", 8, Date) Then
    Count = Count + 1
    Worksheets("Birthdays").Cells(Count, 1).Value = rngCell.Offset(0, -1).Value
    Worksheets("Birthdays").Cells(Count, 2).Value = rngCell.Value
End If
Next
 
Upvote 0
Consider using conditional formatting to highlight the upcoming birthdays.

Hello,

Hope you had a lovely Easter.

I have a worksheet of customers; Column N has DOB, and Column Y has their birthday date this year. Is there a macro that can show a list of all upcoming birthdays (<8 days from today's date) in another worksheet?

Thanks
Andrew
 
Upvote 0
Thanks heaps - the Macro worked great.

Is there a way to make the list start in a current worksheet called input, at cell b40 - rather than the birthday worksheet from A1? And clear the previous list each time it's run? (clear input worksheet, cells B40:C45)

Thanks again for your help
Andrew
 
Upvote 0
This should do it

Code:
Sub Brithday()
Dim rngBirthday As Range
Dim rngCell As Range
Dim Count As Long

Set rngBirthday = Worksheets("Input").Range("B1:B30")
Worksheets("Input").Range("A40:B48").Clear

For Each rngCell In rngBirthday
If rngCell > DateAdd("d", 0, Date) And rngCell < DateAdd("d", 8, Date) Then
    Count = Count + 1
    Worksheets("Input").Cells(39 + Count, 1).Value = rngCell.Offset(0, -1).Value
    Worksheets("Input").Cells(39 + Count, 2).Value = rngCell.Value
End If
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top