+ Reply to Thread
Results 1 to 2 of 2

Creating a master calendar that automatically updates sub-calendars

  1. #1
    Registered User
    Join Date
    01-27-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Windows 7
    Posts
    2

    Creating a master calendar that automatically updates sub-calendars

    Hi there

    I am learning excel vba for a work project. The goal is to have a master holiday calendar that automatically updates the cells in each individual calendar with each holiday (i.e. meaning if I wanted to change the dates of certain holidays, I would only need to do so on the master calendar, and then it would automatically update each employee's individual holiday calendar).

    Currently, this is what I could manage to come up with: looking for cells marked "v" (holidays) and then copying those cells to the next worksheet.

    With Sheets("Mastersheet").Range("B11:AM94")
    Set c = .Find("v", LookIn:=xlValues)
    If Not c Is Nothing Then
    firstaddress = c.Address
    Do
    c.Copy Worksheets("Practice1").Range(c.Address)
    Set c = .FindNext(c)
    If c Is Nothing Then
    GoTo DoneFinding
    End If
    Loop While Not c Is Nothing And c.Address <> firstaddress
    End If
    DoneFinding:
    End With
    End Sub


    But for some reason it stops around November and says "Run time error 1004: We cant do that to a merged cell"



    I am not very familiar with VBA at all, so any comments/thoughts would be much appreciated! Thank you all in advance!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,272

    Re: Creating a master calendar that automatically updates sub-calendars

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Help creating a dashboard that automatically updates
    By AlexNorman100 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-29-2016, 12:56 PM
  2. Replies: 4
    Last Post: 12-07-2014, 11:47 PM
  3. Replies: 1
    Last Post: 09-29-2014, 08:57 AM
  4. Replies: 3
    Last Post: 09-24-2014, 03:09 AM
  5. Replies: 1
    Last Post: 02-26-2014, 08:54 PM
  6. Creating a master sheet that when I update it, automatically updates others
    By SuzyRussell in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-11-2013, 09:00 AM
  7. VBA: Creating a UDF that automatically updates as the data changes.
    By BigBas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-30-2008, 02:21 PM

Tags for this Thread

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