[Solved] Multiple holidays on a calendar day
[Solved] Multiple holidays on a calendar day
Hi everybody.
I decided to make a perpetual calendar by plagiarising the best of other calendars.
I'm not an expert on Calc, but I managed with the forum help to get something reasonable. Thanks.
My last little problem is, that if there are two events on the same day, it only shows the first one.
e.g. in 2016, Burns Night and Bubblewrap Awareness Day both fall on the 25th January.
It only shows Burns Night in the January sheet.
I have (hopefully) attached the spreadsheet for everyone's perusal.
All the dates you want printed in the month sheets go into the right hand column in the workings sheet, and hey Presto!
Well, that was the idea, anyway.
I tried to ladle it with as many instructions so:
a) I can remember how to put in the dates
b) it can be put into a "Handy Spreadsheet" site for everyone else. Once I get that last bit right... Someone might also put me in the right direction for such a site.
I decided to make a perpetual calendar by plagiarising the best of other calendars.
I'm not an expert on Calc, but I managed with the forum help to get something reasonable. Thanks.
My last little problem is, that if there are two events on the same day, it only shows the first one.
e.g. in 2016, Burns Night and Bubblewrap Awareness Day both fall on the 25th January.
It only shows Burns Night in the January sheet.
I have (hopefully) attached the spreadsheet for everyone's perusal.
All the dates you want printed in the month sheets go into the right hand column in the workings sheet, and hey Presto!
Well, that was the idea, anyway.
I tried to ladle it with as many instructions so:
a) I can remember how to put in the dates
b) it can be put into a "Handy Spreadsheet" site for everyone else. Once I get that last bit right... Someone might also put me in the right direction for such a site.
Last edited by MrProgrammer on Sat Jan 11, 2025 4:19 am, edited 4 times in total.
Reason: Edited topic's subject
Reason: Edited topic's subject
LibreOffice 5.1.4.2
Xenial Xerus
Xenial Xerus
Re: How do I get another line?
Place cursor where you want the break, then Ctrl Enter
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
-
ken johnson
- Volunteer
- Posts: 918
- Joined: Sun May 31, 2009 1:35 am
- Location: Sydney, Australia
Re: How do I get another date to show on my calendar?
Also, if you need the two events to be visible in the table in columns AI and AJ of the Workings sheet you could use merged cells as per attachment...
Ken Johnson
Ken Johnson
- Attachments
-
- calendar_example.ods
- (88.66 KiB) Downloaded 185 times
AOO 4.1.3 on Ms Windows 10
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Re: How do I get another date to show on my calendar?
Aah!
I see what you mean...
So now lets look at the year 2017:
Burns Night is on the 25th Jan as per normal.
Bubblewrap Awareness Day is on the 30th Jan.
In 2018, Bubblewrap Awareness Day is on the 29th Jan.
And what's more, Palm Sunday and British Summertime both fall on the 25th March.
Just as BST and Easter Sunday fell on the same day in 2016 (27th March).
I always knew the problem was in the "day" cells in each month.
e.g. =IF(ISNA(VLOOKUP(M8,Holidays,2,0)),"",VLOOKUP(M8,Holidays,2,0))
I see what you mean...
So now lets look at the year 2017:
Burns Night is on the 25th Jan as per normal.
Bubblewrap Awareness Day is on the 30th Jan.
In 2018, Bubblewrap Awareness Day is on the 29th Jan.
And what's more, Palm Sunday and British Summertime both fall on the 25th March.
Just as BST and Easter Sunday fell on the same day in 2016 (27th March).
I always knew the problem was in the "day" cells in each month.
e.g. =IF(ISNA(VLOOKUP(M8,Holidays,2,0)),"",VLOOKUP(M8,Holidays,2,0))
LibreOffice 5.1.4.2
Xenial Xerus
Xenial Xerus
Re: How do I get another date to show on my calendar?
Anyone?
I tried, e.g:
Now I get too many Global Belly Laugh days and the wrong day for Bubblewrap Awareness day as well as the correct holidays.
The days in the month of January have been altered with the above formula to see the problem.
I tried, e.g:
Code: Select all
=IF(ISNA(VLOOKUP(D12,Holidays,2,0)),"",VLOOKUP(D12,Holidays,2,0) &CHAR(10) & IF(VLOOKUP(D12,Holidays,2,1)<>VLOOKUP(D12,Holidays,2,0),VLOOKUP(D12,Holidays,2,1) ,""))The days in the month of January have been altered with the above formula to see the problem.
LibreOffice 5.1.4.2
Xenial Xerus
Xenial Xerus
-
ken johnson
- Volunteer
- Posts: 918
- Joined: Sun May 31, 2009 1:35 am
- Location: Sydney, Australia
Re: How do I get another date to show on my calendar?
Provided Holidays Database Range contains no more than two entries sharing the same date you can lookup the second entry by changing the height of vlookup's second parameter, array.
For example, 25/01/16's first entry, Burns Night, is on Holidays' 6th row. Hence VLOOKUP's array parameter for looking up 25/01/16's second entry, Bubble Wrap Awareness, should start on Holidays' 7th row,the next row down.
This reduced part of the Holidays Database Range is returned by the following formula...
Note that it has two INDEX functions separated by a colon. When the INDEX function is used this way each INDEX function returns a reference to a range instead of its contents. returns a reference to the cell immediately below the first instance of 25/01/16.returns a reference to Holidays' bottom-right cell.
Using this method in your formula results in...
Ken Johnson
For example, 25/01/16's first entry, Burns Night, is on Holidays' 6th row. Hence VLOOKUP's array parameter for looking up 25/01/16's second entry, Bubble Wrap Awareness, should start on Holidays' 7th row,the next row down.
This reduced part of the Holidays Database Range is returned by the following formula...
Code: Select all
INDEX(Holidays;MATCH(C12;INDEX(Holidays;0;1);0)+1;1):INDEX(Holidays;ROWS(Holidays);2)Code: Select all
INDEX(Holidays;MATCH(C12;INDEX(Holidays;0;1);0)+1;1)Code: Select all
INDEX(Holidays;ROWS(Holidays);2)Using this method in your formula results in...
Code: Select all
=IF(ISNA(VLOOKUP(C12;Holidays;2;0));"";VLOOKUP(C12;Holidays;2;0) &IF(ISNA(VLOOKUP(C12;INDEX(Holidays;MATCH(C12;INDEX(Holidays;0;1);0)+1;1):INDEX(Holidays;ROWS(Holidays);2);2;0));"";CHAR(10)&VLOOKUP(C12;INDEX(Holidays;MATCH(C12;INDEX(Holidays;0;1);0)+1;1):INDEX(Holidays;ROWS(Holidays);2);2;0)))- Attachments
-
- calendarExample2.ods
- (107.1 KiB) Downloaded 202 times
AOO 4.1.3 on Ms Windows 10
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Re: How do I get another date to show on my calendar?
Well, that certainly seems to work.
I noticed you managed to do all 365 days.
That must've taken ages, or do you have a sneaky way?...
Thanks!
Is there a site I can put it for people to share?
I noticed you managed to do all 365 days.
That must've taken ages, or do you have a sneaky way?...
Thanks!
Is there a site I can put it for people to share?
LibreOffice 5.1.4.2
Xenial Xerus
Xenial Xerus
-
ken johnson
- Volunteer
- Posts: 918
- Joined: Sun May 31, 2009 1:35 am
- Location: Sydney, Australia
Re: How do I get another date to show on my calendar?
Nothing sneaky, just Copy then Paste Special/Formula.Fitch wrote:I noticed you managed to do all 365 days.
That must've taken ages, or do you have a sneaky way?...
Any file sharing site could be used.Fitch wrote:Is there a site I can put it for people to share?
I mainly use MediaFire.
Ken Johnson
AOO 4.1.3 on Ms Windows 10
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Help improve this forum by clicking the EDIT button on your first post then adding "[Solved]" to its heading once a solution to your problem has been provided.
Re: how to expand Holiday Database Range
How do I expand the Holidays Database Range. I have 145 relative's birthdays I want to add.
Hollie Gill, OpenOffice 4, Windows 11
- MrProgrammer
- Moderator
- Posts: 5430
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: [Solved] How do I get another date to show on my calendar?
Data → Define Range
If you have further questions, open your own topic. This one belongs to Fitch. You are more likely to get your problem solved quickly if you attach the spreadsheet file you're working with. Do not attach a picture of it.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).