How to Return Column Data Based on All Populated Cells in Row Range and Match Data to Other Worksheet Based on Output

antman2988

Board Regular
Joined
Jun 28, 2018
Messages
78
Hi Everyone,

I need help with an issue I can't seem to find an exact answer for. Basically, I need to return the column data for all populated cells with the letter "X" in the row. Then return the column header to different cells in the row.

Example:

User IDJob 1 Job 2Job 3Job 4Output 1Output 2
Jonh.SmithXXJob 1Job 4
Bob.LangXXJob 1Job 2

<tbody>
</tbody>

The formula will be applied to about 500 rows of data with about 30 columns. I would like all headers to be returned if it has an x in the column for each row. I would also like all the data to be next to each other in regards to the columns (e.g. no blank cells between output data). I assume this can be taken care of with one or two formulas that can be copied to the other cells.

In addition, I have another issue. After I get this data, I want to do something a bit more complex. There's another sheet in which I have all of the classes that each user should be taking based on what their job is. Each user will be taking multiple classes. The next thing I need help with is matching the user's job to the classes they should be taking. The above data will be match to the below data.

Class 1Class 2Class 3Class 4
Job 1XX
Job 2XXX
Job 3XX
Job 4XXX

<tbody>
</tbody>

<tbody></tbody>

The other sheet contains data that shows which class a user should be taking denoted by the letter "X" in each row.

The final output should be something like this:

User IDJob 1 Job 2Job 3Job 4Output 1Output 2Output 3Output 4Output 5
Jonh.SmithXXJob 1Job 4Class 2Class 4Class 3
Bob.LangXXJob 1Job 2Class 1Class 2

<tbody>
</tbody>
Class 4

I am not an advanced user of Excel so any help is greatly appreciated.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Another output that would be useful is this:

User IDOutput 1Output 3Output 4Output 5
Jonh.SmithJob 1
Job 4
Class 2
Class 1
Class 4
Class 2

Class 3
Bob.LangJob 1
Job 2
Class 2
Class 1

Class 4
Class 4

<tbody>
</tbody>

In this case, duplicates are fine. If you can give me answers to both output formats, that would be amazing.
 
Upvote 0

Forum statistics

Threads
1,215,197
Messages
6,123,581
Members
449,108
Latest member
rache47

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