0

I need to find openings in a group of people's schedules because I can't merge them easily with any native web program we use the calendars in. I will be looking at each person's calendar at a time and placing an "x" in the User Input Area on the left and I want to transform the data into a similar area on the right for a single day at a time.

I need help with a INDEX & MATCH formula - it's always eluded me - and I can figure it out on single-criteria but when trying to match on multiple columns like this I can't wrap my head around it.

  • I want to be able to drag the formula and autocomplete, easily editing when I need to add or remove members.
  • Maybe there's some IF cascade of cell references that would work easier that I'm blowing over too. Or something else entirely that I don't know aobut.
  • Will it work with merged cells? I'm unsure how cell references for those work, both directions.

Obviously the formula I have won't work as is because I need to add the references to Monday-Friday as well.

=INDEX($B$4:$AJ$18,MATCH($AL4,$A$4:$A$18,1),MATCH(AM$3,$B$2:$AJ$2,1))

Excel workbook screenshot

1 Answer 1

1

Put this in cell AM4:

=IF(INDEX($B$4:$AJ$18,ROWS($AL$4:$AL4),QUOTIENT(MATCH(AM$3,$B$2:$AJ$2,0),5)*5+COUNTA($AM$2:AM$2))="","","x")

Drag it to cell AS18. Then copy the whole range to the other ranges.

The row reference is a no brainer: the two lists of hours are identical so one just need to count how many rows are between the given row and the starting row. The column is a little trickier, but not a great deal. We can use a MATCH formula to find the column of the given person. This value must be divided by 5 (number of workdays in each week) and its quotient (the integer part of the result) must be multiplied by 5. This will "move" our column to the edge of the range of the desired person. We should add 1 to this result to make it work but the next step will make it unecessary. In fact we need to correct it for the desired day. To achieve this we simply count how many values can we count in the day row from the beginning of the list up to our column. Since this value will at least be 1, it's already complementary to the previous correction.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.