birthdays list

KlausW

Active Member
Joined
Sep 9, 2020
Messages
401
Office Version
  1. 2016
Platform
  1. Windows
Hi
I want to make a birthday list where the months come in a cell for themselves and the birthdays come down there after. Starting with January. The challenges are that new people come every year so the birthdays are not the same year after year. Someone who can help.
The red are my formulas and they are hidden
The dates are in danish dd/mm/yy
The file is uploadet to Dropbox Birthday
All help will be appreciated
Regards Klaus W
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I deleted Coloumn F; there was no header and the data seemed redundant.

I inserted a new row 4.
c4 text - month - Enter the Month label where you want it and center it across relevant columns.
DOB 01-01-01
I inserted new rows for the start of each month
DOB edate

Cell Formulas
RangeFormula
H4:H10H4=MONTH(G4)
I4:I10I4=DATE(1,MONTH(G4),DAY(G4))
J4:J10J4=TEXT(G4,"mmmm")
A5,A10,A7:A8A5=(TEXT(J5,"dd"))
C5,C10,C7:C8C5=IFERROR(VLOOKUP(F5,Name!$A$2:$B$25,2,FALSE),"")
F5F5=Name!A2
G5,G10,G7:G8G5=--TEXT(LEFT(F5,6),"00-00-00")
G6,G9G6=EDATE(G4,1)
F7:F8F7=Name!A3
F10F10=Name!A5
 
Upvote 0
I noticed your formula for the label and the columns that you centered across.
I revised the post to below but was too late to complete the edit to the post above.

Cell Formulas
RangeFormula
H4:H10H4=MONTH(G4)
I4:I10I4=DATE(1,MONTH(G4),DAY(G4))
J4:J10J4=TEXT(G4,"mmmm")
C5,C10,C7:C8C5=IFERROR(VLOOKUP(F5,Name!$A$2:$B$25,2,FALSE),"")
F5F5=Name!A2
G5,G10,G7:G8G5=--TEXT(LEFT(F5,6),"00-00-00")
G6,G9G6=EDATE(G4,1)
F7:F8F7=Name!A3
A4,A9,A6A4=PROPER(TEXT(G4,"mmmm"))
A5,A10,A7:A8A5=(TEXT(J5,"dd"))
F10F10=Name!A5
 
Upvote 0
I suggest to use a small VBA macro:
VBA Code:
Function sbBirthdayList(r As Range) As Variant
'Create monthly birthday list.
'Reverse("moc.LiborPlus.www") V0.10 PB 15-Sep-2010
Dim vR(1 To 13, 1 To 3) As Variant
Dim i As Long, j As Long
Dim sNames(101 To 1231) As String

'Fill temporary array
For i = 1 To r.Rows.Count
    If IsDate(r.Cells(i, 2)) Then
        j = Month(r.Cells(i, 2))
        vR(j + 1, 2) = vR(j + 1, 2) + 1 'Increasing DOB counter for month
        j = j * 100 + Day(r.Cells(i, 2))
        If sNames(j) <> "" Then sNames(j) = sNames(j) & ", "
        sNames(j) = sNames(j) & r.Cells(i, 1)
    End If
Next i

'Fill output area
vR(1, 1) = "Month"
vR(1, 2) = "#"
vR(1, 3) = "(Day) Names"
For i = 1 To 12
    vR(i + 1, 1) = Format(DateSerial(1900, i, 1), "MMMM")
    vR(i + 1, 3) = ""
    For j = 1 To 31
        If sNames(i * 100 + j) <> "" Then
            If vR(i + 1, 3) <> "" Then vR(i + 1, 3) = vR(i + 1, 3) & ", "
            vR(i + 1, 3) = vR(i + 1, 3) & "(" & j & ") " & sNames(i * 100 + j)
        End If
    Next j
Next i

sbBirthdayList = vR

End Function


Article sbBirthdayList
 
Upvote 0
Good morning Sulprobil
Thanks, I tried to insert the code into the sheets, I can get it does not make it run the code. Neither in the sheet nor in a module. What am I doing wrong. KW
 
Upvote 0
I noticed your formula for the label and the columns that you centered across.
I revised the post to below but was too late to complete the edit to the post above.

Cell Formulas
RangeFormula
H4:H10H4=MONTH(G4)
I4:I10I4=DATE(1,MONTH(G4),DAY(G4))
J4:J10J4=TEXT(G4,"mmmm")
C5,C10,C7:C8C5=IFERROR(VLOOKUP(F5,Name!$A$2:$B$25,2,FALSE),"")
F5F5=Name!A2
G5,G10,G7:G8G5=--TEXT(LEFT(F5,6),"00-00-00")
G6,G9G6=EDATE(G4,1)
F7:F8F7=Name!A3
A4,A9,A6A4=PROPER(TEXT(G4,"mmmm"))
A5,A10,A7:A8A5=(TEXT(J5,"dd"))
F10F10=Name!A5
Good morning Dave I do not know how to for Excel to what I can not. Could you grab the file and open it from Dropbox?
KW
 
Upvote 0
Good morning Sulprobil
Thanks, I tried to insert the code into the sheets, I can get it does not make it run the code. Neither in the sheet nor in a module. What am I doing wrong. KW
Please click on the article link below the code. You can download a sample file at the end of that page.
 
Upvote 0
Thanks, I'm not a shark in Excel. So therefore these questions. I can not quite find the file you are writing about. I can find the Download folder. here I can donate to a hospital. That's the point of getting the file, isn't it? many thanks Klaus W.
 
Upvote 0
No. Underneath my code here is the link to my article, and directly below the same code of that article is the download link to a sample file.
 
Upvote 0
@Sulprobil
Maybe it would be helpful if you actually explained to the OP how to use your function, rather than trying to push him into downloading a file from a strange site and then having to try & figure out what is going on.
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,845
Members
449,471
Latest member
lachbee

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