+ Reply to Thread
Results 1 to 2 of 2

Populate a specific range based on calendar date

  1. #1
    Registered User
    Join Date
    06-21-2014
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    11

    Populate a specific range based on calendar date

    Hello. This is my first post in an Excel Forum and although I'm a beginner I believe I've got the grasp of how to do simple things pretty easily. I've messed around with VBA a lot in Access so I have a decent understanding of things to do.

    The reason I'm posting here is because I have no clue how to really find what I'm searching for.

    So I have been given a master calendar sheet with a 28 day cycle of employees schedules and 28 separate tabs that shows the individual days and assignments for those employees on each day of that 28 day cycle.

    My supervisors have somehow not managed to kill themselves for doing this so many years, but this excel sheet is completely static. So every single entry has to be manually duplicated over to the 28 separate sheets for that 28 day cycle. Really redundant and takes a lot of time to do. I have made this a lot easier to pull off but the next thing I have to do I am unsure on how to go about doing it.

    So the calendar on the master sheet from Range("D4:AE4") show each day of that 28 day cycle and Range("A5:A85") show all the employees names.

    If each cell inbetween Range("D5:AE85") is blank then that means they are present to work that day. If there is an "X" value or some other type of value in the cell then they do not work that day.

    On each daily sheet of the 28 day cycle there is a list of all employees and adjacent to the list of employees if they are working or not that day. I would like this area in particular to be populated from the master calendar sheet respective to what date it is.

    So on each daily sheet the date is located on Range("B3") and I would like to find a way to search Range("D4:AE4") of the calendar sheet and when it finds the match to that sheet it then takes that specific column on the master calendar and populates its values to the individual sheet.

    For example

    The date of the daily sheet of cell Range("B3") is 6/23/2014. That daily sheet looks for the 6/23/2014 date value from the calendar sheet in the range("D4:AE4") and lets say it finds the match in Range("G4") then that daily sheet grabs the information from Range("G5:G85") and then places it on that daily sheet in the respective area.

    Hope I explained this well. I am unsure what I need to do but i know what I would like my goal to be. Thanks for any help!

  2. #2
    Registered User
    Join Date
    06-21-2014
    Location
    Austin, Texas
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Populate a specific range based on calendar date

    Well just like most of my posts in forums I tend to find the answer I'm looking for soon after I send out the post.

    =IF(INDEX(TestCalendar!D5:AE5,MATCH(B3,TestCalendar!D4:AE4,0)) = 0, "",INDEX(TestCalendar!D5:AE5,MATCH(B3,TestCalendar!D4:AE4,0)))

    It was redundant to put this formula in about 75 times but it works for what I need. The Match looks for the current date of the assignment sheet and then the index takes the value corresponding with the match. The If statement just allows me to place the correct value in the cell of that assignment sheet.

+ 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] Auto Populate Excel Calendar based on Date Ranges
    By mikearmanios in forum Excel General
    Replies: 14
    Last Post: 04-01-2021, 12:11 PM
  2. [SOLVED] Populate cells based on date and time range selection
    By garyfahy in forum Excel General
    Replies: 3
    Last Post: 03-10-2014, 08:43 AM
  3. Replies: 2
    Last Post: 05-30-2013, 12:45 PM
  4. Replies: 0
    Last Post: 07-03-2012, 03:52 PM
  5. Populate a cell based on a date range
    By favoritepsalm1 in forum Excel General
    Replies: 4
    Last Post: 09-27-2010, 08:22 AM

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