+ Reply to Thread
Results 1 to 14 of 14

Populate calendars based on office location

  1. #1
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Populate calendars based on office location

    Hi there!

    I'm trying to create a roster with a calendar so my team has an easy way to see which office they should be in.

    I have a table with the date, staff name and the office they should be in on the respective date, and I'm hoping to have that information reflect on a calendar.

    We have three offices: W, WFH (work from home) and AP.

    The W office is our default so I created two calendars for the other offices (open to suggestions for combining the two but I assumed one for each would be simpler at this point in terms of Excel).

    I'd like the cells under the calendar date to populate with the name of the staff member who should be in that particular office.

    I've tried vlookup and xlookup with no success.

    Any help or suggestions will be greatly appreciated!
    Attached Files Attached Files

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

    Re: Populate calendars based on office location

    Welcome to the forim.

    This will be a whole lot easier if you are using MS365, and as you have SEQUENCE in the workbook, you cannot be using Excel 2016 - please update your profile so that we know what we are working with.

    Thanks.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Populate calendars based on office location

    If you don't mid to insert some field into the table.

    Please try, insert 2 field with

    D
    =[@Office]&[@Date]

    E
    =IFERROR(LOOKUP(2,1/(D$1:D1=D2),E$1:E1),"")&","&B2

    In the result sheet

    A6
    =IFERROR(MID(INDEX(Table1[[#All],[NameList]],AGGREGATE(14,6,ROW(Table1[[#All],[NameList]])/(1/(Table1[[#All],[DateOffice]]="AP"&DATE(YEAR($A$3),MONTH($A$3),A5))),1)),2,1000),"")

    Regards.

    Note : Please chang your profile, Excel 2016 didn't have function SEQUENCE.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Populate calendars based on office location

    Thank you - I've updated this

  5. #5
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Populate calendars based on office location

    Thank you! I've updated my profile as well.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Populate calendars based on office location

    With MS365, you could use this in A5:

    =FILTER(Table1[Staff],(Table1[Office]="AP")*(Table1[Date]=DATEVALUE($A$3)+A5-1),"")

    I have changed your conditional formatting rule to an all-in-one formula:

    =AND(NOT(ISTEXT(A5)),OR(A5>DAY(EOMONTH($A$3,0)),A5<1))

    Clearly if you want to combine W and AP, then you are going to need to make much more space on the calendar.

    For AP and W together, it would be:

    =FILTER(Table1[Staff],(Table1[Office]<>"WFH")*(Table1[Date]=DATEVALUE($A$3)+A5-1),"")
    Attached Files Attached Files
    Last edited by AliGW; 05-09-2022 at 02:37 AM. Reason: Added information.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Populate calendars based on office location

    Any quetions?

    Here's the calendar set up for AP and W combined.
    Attached Files Attached Files
    Last edited by AliGW; 05-09-2022 at 02:55 AM. Reason: Workbook attached.

  8. #8
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Populate calendars based on office location

    I have tried to copy what you did on the AP page over to the WFH page:
    =FILTER(Table1[Staff],(Table1[Office]="WFH")*(Table1[Date]=DATEVALUE($A$3)+A5-1),"") )

    I'm not sure why but it isn't working the way that the AP sheet does I've reuploaded with what I tried for the WFH office
    Attached Files Attached Files
    Last edited by AliGW; 05-10-2022 at 12:20 AM. Reason: PLEASE don't quote unnecessarily

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Populate calendars based on office location

    Why not just do a PivotTable?

    Office Scheduling.png
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Populate calendars based on office location

    Thanks for the suggestion! I'll implement this now while I get my head around filter formulas

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Populate calendars based on office location

    You had not applied the conditional formatting - I've fixed that for you. See my previous post.

    I have changed your conditional formatting rule to an all-in-one formula:

    =AND(NOT(ISTEXT(A5)),OR(A5>DAY(EOMONTH($A$3,0)),A5<1))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Attached Files Attached Files

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Populate calendars based on office location

    Have we got there now? Or are you using pivot tables instead?

  13. #13
    Registered User
    Join Date
    05-08-2022
    Location
    Australia
    MS-Off Ver
    Microsoft 365
    Posts
    9

    Re: Populate calendars based on office location

    I'm using both! Thank you for all your help I fixed the formatting as well

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Populate calendars based on office location

    Great - thanks for letting us know.

+ 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. [SOLVED] File location problems when using OneDrive and Office 365
    By aglawrence in forum Excel General
    Replies: 3
    Last Post: 12-16-2018, 06:39 PM
  2. Match IP address to Office Location
    By griam01 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-31-2016, 12:07 PM
  3. [SOLVED] populate text box in user form with cell location based on click within worksheet
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-19-2015, 09:15 PM
  4. Replies: 0
    Last Post: 04-23-2014, 12:06 PM
  5. [SOLVED] Public Sub to control display location of any UserForm (Office 2010)
    By avr5iron in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2013, 06:47 PM
  6. Microsoft Office 12.0 Object Library Filename and Location?
    By bditomasso in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2013, 06:01 PM
  7. [SOLVED] How to populate a table based on the cell location of given datas?
    By EllenS in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2013, 09:49 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