MrBungleBear
New Member
- Joined
- Jan 18, 2011
- Messages
- 10
Hi.
I have a frustrating problem - here is the set up:
I have a calendar sheet where the dates go down the rows, and there is one column per member of staff. The staff is split in to three streams (different apps to cover, etc).
In the calendar, we mark a "C" for when someone will be on-call, R for when they will be doing a release, and so on.
In a separate sheet in the workbook, rather than having people look at the whole calendar of 30+ people to see who is on what shift for a given stream, I have an On-Call Rota where the rows are again the dates, and the columns are the streams. In each cell of this sheet, there should be the names of all the people of that stream who will be on-call for that date, so a concatenation of the actual staff members from the calendar, separated by CHAR(10).
I have been unable to find a combination of INDEX, MATCH, LOOKUP, VLOOKUP, etc, etc that gets me past the main problem: they only ever match the first C (or the first R for the On-Release Rota). I can't get a formula for a single cell in the rota that will return all the names where there is a C in the calendar in such a way that I can concatenate them.
Here is the kind of thing I have had to do:
=CONCATENATE(IF(ISNA(MATCH("*R*",Calendar!AA47,0)),"",Calendar!AA$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AB47,0)),"",Calendar!AB$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AD47,0)),"",Calendar!AD$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AE47,0)),"",Calendar!AE$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AF47,0)),"",Calendar!AF$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AG47,0)),"",Calendar!AG$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AH47,0)),"",Calendar!AH$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AI47,0)),"",Calendar!AI$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AJ47,0)),"",Calendar!AJ$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AK47,0)),"",Calendar!AK$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AL47,0)),"",Calendar!AL$11&CHAR(10)))
I am sure you will agree that (a) it is really not elegant at all!! and (b) if you were to move a staff member in the calendar, the whole thing falls apart with #REF errors and the like... Horrible.
There ought to be a way to do this with a whole range (ie: the columns for that stream) that would return all the names (in row 11) for any column where there is a "C" in the coresponding date row and name column combo.
eg:
A B C D E
1 S T R E A M A
2 John Bob Rich Tom
3 1 Feb C C
4 2 Feb C C
5 3 Feb C C
6 4 Feb C C
7 5 Feb C C
and we want another sheet to show
Rota
A B
1 STREAM A
2 1 Feb Rich
Tom
3 2 Feb John
Bob
4 3 Feb Rich
Tom
5 4 Feb John
Rich
6 5 Feb Bob
Tom
Does anyone have any solutions, preferrably not requiring VBA? I looked at Array Formula stuff, but there doesn't seem to be a set of functions that work as an array formula to give me what I want.
Thanks!
G>
I have a frustrating problem - here is the set up:
I have a calendar sheet where the dates go down the rows, and there is one column per member of staff. The staff is split in to three streams (different apps to cover, etc).
In the calendar, we mark a "C" for when someone will be on-call, R for when they will be doing a release, and so on.
In a separate sheet in the workbook, rather than having people look at the whole calendar of 30+ people to see who is on what shift for a given stream, I have an On-Call Rota where the rows are again the dates, and the columns are the streams. In each cell of this sheet, there should be the names of all the people of that stream who will be on-call for that date, so a concatenation of the actual staff members from the calendar, separated by CHAR(10).
I have been unable to find a combination of INDEX, MATCH, LOOKUP, VLOOKUP, etc, etc that gets me past the main problem: they only ever match the first C (or the first R for the On-Release Rota). I can't get a formula for a single cell in the rota that will return all the names where there is a C in the calendar in such a way that I can concatenate them.
Here is the kind of thing I have had to do:
=CONCATENATE(IF(ISNA(MATCH("*R*",Calendar!AA47,0)),"",Calendar!AA$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AB47,0)),"",Calendar!AB$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AD47,0)),"",Calendar!AD$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AE47,0)),"",Calendar!AE$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AF47,0)),"",Calendar!AF$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AG47,0)),"",Calendar!AG$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AH47,0)),"",Calendar!AH$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AI47,0)),"",Calendar!AI$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AJ47,0)),"",Calendar!AJ$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AK47,0)),"",Calendar!AK$11&CHAR(10)),IF(ISNA(MATCH("*R*",Calendar!AL47,0)),"",Calendar!AL$11&CHAR(10)))
I am sure you will agree that (a) it is really not elegant at all!! and (b) if you were to move a staff member in the calendar, the whole thing falls apart with #REF errors and the like... Horrible.
There ought to be a way to do this with a whole range (ie: the columns for that stream) that would return all the names (in row 11) for any column where there is a "C" in the coresponding date row and name column combo.
eg:
A B C D E
1 S T R E A M A
2 John Bob Rich Tom
3 1 Feb C C
4 2 Feb C C
5 3 Feb C C
6 4 Feb C C
7 5 Feb C C
and we want another sheet to show
Rota
A B
1 STREAM A
2 1 Feb Rich
Tom
3 2 Feb John
Bob
4 3 Feb Rich
Tom
5 4 Feb John
Rich
6 5 Feb Bob
Tom
Does anyone have any solutions, preferrably not requiring VBA? I looked at Array Formula stuff, but there doesn't seem to be a set of functions that work as an array formula to give me what I want.
Thanks!
G>
Last edited by a moderator: