+ Reply to Thread
Results 1 to 3 of 3

Multiple Events not displayed for a day in the Calendar

  1. #1
    Forum Contributor
    Join Date
    10-14-2013
    Location
    INDIA
    MS-Off Ver
    EXCEL 2013
    Posts
    154

    Multiple Events not displayed for a day in the Calendar

    Dear Experts

    I am enclosing herewith the Holiday and To Do List Calendar which shows only a single event for a day. I request you to help me in showing multiple events, in case if there is more than one per day / date.

    Thanks in advance

    With regards

    buvanamali
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,675

    Re: Multiple Events not displayed for a day in the Calendar

    This code is placed in worksheet_change event, to trigger change in B2
    PHP Code: 
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim k&, i&, t&, cell As Rangearr(1 To 10001 To 2)
    If 
    Intersect(TargetRange("B2")) Is Nothing Then Exit Sub
    Range
    ("A5:G40").ClearContents ' delete history
    '
    read event date into array (arr)
    With Worksheets("Sheet2")
        For 
    Each cell In .Range("F2:F" & .Cells(Rows.Count"F").End(xlUp).Row)
            
    1
            arr
    (k1) = cell.Value
            arr
    (k2) = cell.Offset(01).Value
        Next
        
    For Each cell In .Range("J2:J" & .Cells(Rows.Count"J").End(xlUp).Row)
            
    1
            arr
    (k1) = cell.Value
            arr
    (k2) = cell.Offset(01).Value
        Next
    End With
    0
    For Each cell In Range("A5:G5, A11:G11, A17:G17, A23:G23, A29:G29, A35:G35")
        
    cell.Value Target Choose(Weekday(Target), 0123456) + ' find the latest Sunday of month, write to first cell
        If cell.Row = 5 Then cell.Offset(-1, 0).Value = Format(cell, "ddd") ' 
    days header
        k 
    1
         
    ' loop through event dates, if found then write into sheet, row by row
        For i = 1 To UBound(arr)
            If cell.Value = arr(i, 1) Then
                t = t + 1
                cell.Offset(t, 0).Value = arr(i, 2)
            End If
        Next
        t = 0
    Next
    End Sub 
    Attached Files Attached Files
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    10-14-2013
    Location
    INDIA
    MS-Off Ver
    EXCEL 2013
    Posts
    154

    Re: Multiple Events not displayed for a day in the Calendar

    Dear Bebo
    Thanks a lot. It is working fine. Really you people are Legends.
    Thanks once again.
    With regards
    buvanamali

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calendar with auto-populating events (multiple events in a single date)
    By zankzank in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-20-2021, 09:41 AM
  2. Autopoplate calendar with multiple day events from Table
    By lilou.paris.1589 in forum Excel General
    Replies: 13
    Last Post: 01-04-2021, 01:28 PM
  3. Multiple events same date calendar will only show one event per day not all
    By KtB73 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2020, 12:34 AM
  4. [SOLVED] How to Add Events to Calendar
    By ynab in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2020, 09:18 AM
  5. Replies: 4
    Last Post: 11-11-2019, 01:42 PM
  6. View multiple events in a date calendar
    By imzhakmaya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2014, 06:40 AM
  7. Is there a way to have values displayed if it appear under multiple events?
    By Tee51 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 07-19-2012, 05:30 PM

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