Hundreds of Lockups, Formula Inefficiency, Help (Struggling to even define it to be honest)

Isambard

New Member
Joined
Mar 6, 2014
Messages
9
Hi,

I have a timeline of various projects in excel with the people working on them. Each person may be working on multiple projects simultaneously and I want to create a table of all my people, showing which active projects theyÂ’re assigned to on any given week. I already have a table with the projects on down the side and the weeks along them top, populated with all the people on that project which looks something like:

Week 1Week 2Week 3
Project 1 Mr A; Mr BMr A; Mr BMr A; Mr B
Project 2Mr CMr C
Project 3 Mr A; Mr CMr A; Mr C

<tbody>
</tbody>

I now want to create a table for the active projects my people have in any given week, so for the above table that would look like:

Week 1Week 2Week 3
Mr AProject 1; Project 3Project 1; Project 3Project 1
Mr BProject 1Project 1Project 1
Mr CProject 3Project 2; Project 3Project 2

<tbody>
</tbody>


I have got a solution to this but itÂ’s really horrible and IÂ’m sure must be inefficient in CPU terms. This is the first cell in the table:

= IF(COUNTIF(S$32,"*"&$F5&"*"),$B$32&"; ","")
&IF(COUNTIF(S$33,"*"&$F5&"*"),$B$33&"; ","")
&IF(COUNTIF(S$34,"*"&$F5&"*"),$B$34&"; ","")
&IF(COUNTIF(S$35,"*"&$F5&"*"),$B$35&"; ","")
&IF(COUNTIF(S$36,"*"&$F5&"*"),$B$36&"; ","")
&IF(COUNTIF(S$37,"*"&$F5&"*"),$B$37&"; ","")
&IF(COUNTIF(S$38,"*"&$F5&"*"),$B$38&"; ","")
. . .

And on, and on, down through over 100 projects, maybe more in the future. F:F contains all the people names, and B:B the project names.

This is working, but as I say feels like a really crude solution, and I worry that in the future the amount of calculation might crash the spreadsheet. I know there are functions like sumifs, but I don’t know of anything like a “vlookup-ifs” function, and I’m not sure how I’d begin doing an array for this. Any help to get a cleaner solution than mine would be massively appreciated.

Thank you
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
If you have one of the newer versions of Excel with the TEXTJOIN function, you could do this:

ABCD
1Week 1Week 2Week 3
2Project 1Mr A; Mr BMr A; Mr BMr A; Mr B
3Project 2Mr CMr C
4Project 3Mr A; Mr CMr A; Mr C

<tbody>
</tbody>


FGHI
1Week 1Week 2Week 3
2Mr AProject 1; Project 3Project 1; Project 3Project 1
3Mr BProject 1Project 1Project 1
4Mr CProject CProject 2; Project 3Project 2

<tbody>
</tbody>


G2: =TEXTJOIN("; ",TRUE,IF(ISNUMBER(SEARCH($F2,B$2:B$4)),$A$2:$A$4,""))
confirmed with Control+Shift+Enter.

Copy G2 to the right and down as needed.

If you don't have TEXTJOIN, you'll need to either use a long formula like you have, or use VBA in some manner. For example, I have a UDF that mimics the way TEXTJOIN works. If you want to try that, let me know.
 
Upvote 0
Hi,

I have a timeline of various projects in excel with the people working on them. Each person may be working on multiple projects simultaneously and I want to create a table of all my people, showing which active projects they’re assigned to on any given week. I already have a table with the projects on down the side and the weeks along them top, populated with all the people on that project which looks something like:

I now want to create a table for the active projects my people have in any given week, so for the above table that would look like:

I have got a solution to this but it’s really horrible and I’m sure must be inefficient in CPU terms. This is the first cell in the table:

And on, and on, down through over 100 projects, maybe more in the future. F:F contains all the people names, and B:B the project names.

This is working, but as I say feels like a really crude solution, and I worry that in the future the amount of calculation might crash the spreadsheet. I know there are functions like sumifs, but I don’t know of anything like a “vlookup-ifs” function, and I’m not sure how I’d begin doing an array for this. Any help to get a cleaner solution than mine would be massively appreciated.

Thank you

Hi!

Maybe the Array Formula below in G2 and copy down and to the right can helps.

Use Ctrl+Shift+Enter to enter the formula

=IFERROR(INDEX($B$2:$B$101,SMALL(IF(ISNUMBER(SEARCH("*; "&$F2&";*","; "&INDEX($C$2:$E$101,,MATCH(G$1,$C$1:$E$1,0))&";")),ROW($B$2:$B$101)-ROW($B$2)+1),1)),"")&
IFERROR("; "&INDEX($B$2:$B$101,SMALL(IF(ISNUMBER(SEARCH("*; "&$F2&";*","; "&INDEX($C$2:$E$101,,MATCH(G$1,$C$1:$E$1,0))&";")),ROW($B$2:$B$101)-ROW($B$2)+1),2)),"")&
IFERROR("; "&INDEX($B$2:$B$101,SMALL(IF(ISNUMBER(SEARCH("*; "&$F2&";*","; "&INDEX($C$2:$E$101,,MATCH(G$1,$C$1:$E$1,0))&";")),ROW($B$2:$B$101)-ROW($B$2)+1),3)),"")


Ps: the formula above works for until 3 projects for people for week. You can change the formula for more projects.

ABCDEFGHIJ
1Week 1Week 2Week 3Week 1Week 2Week 3
2Project 001Mr 01; Mr 02Mr 01; Mr 02Mr 01; Mr 02Mr 01Project 001; Project 003Project 001; Project 003Project 001
3Project 002Mr 03Mr 03Mr 02Project 001Project 001Project 001
4Project 003Mr 01; Mr 03Mr 01; Mr 03Mr 03Project 003Project 002; Project 003Project 002
5Project 004Mr 04
6Project 005Mr 05
7Project 006Mr 06
8Project 007Mr 07
9Project 008Mr 08
10Project 009Mr 09
11Project 010Mr 10
12Project 011Mr 11
13Project 012Mr 12
14Project 013Mr 13
15Project 014Mr 14
16Project 015Mr 15
17Project 016Mr 16
18Project 017Mr 17
19Project 018Mr 18
20Project 019Mr 19
21Project 020Mr 20
22
******************************************************************************************************************************

<tbody>
</tbody>


Markmzz
 
Upvote 0
Thanks all. I'm really pleased to know that at least there are options. I will try some of these next week when I have some time. Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top