Summarise table based on value

Daroh

Board Regular
Joined
Aug 19, 2016
Messages
62
Hi, I have a table, names of people in column (A) and names of tests in columns B to Y. Each person can only do specific tests which is marked by the name of the test under the heading. If the person cannot do the test this cell is left blank. Is there a way I can select a specific person's name and get a summary (list format) of the tests they can do? Below is an example of I currently have. John can only do test 3 which is marked under test 3 by the name of the test. I have used a table slicer. However, due to the length of the table this is not a viable option.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Names[/TD]
[TD]Test 1[/TD]
[TD]Test 2[/TD]
[TD]Test 3[/TD]
[TD]Test 4[/TD]
[TD]Test 5[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD][/TD]
[TD][/TD]
[TD]Test 3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[TD]Test 1[/TD]
[TD][/TD]
[TD]Test 3[/TD]
[TD]Test 4[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD][/TD]
[TD]Test 2[/TD]
[TD]Test 3[/TD]
[TD][/TD]
[TD]Test 5[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]Test 1[/TD]
[TD][/TD]
[TD]Test 3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Mark[/TD]
[TD][/TD]
[TD]Test 2[/TD]
[TD]Test 3[/TD]
[TD]Test 4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thanks.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
try the following codes
Code:
Sub daroh()
Dim x As Long, c As Long, d As Long, b As Long
Dim e As String
d = 0
x = Cells(Rows.Count, 1).End(xlUp).Row


       e = InputBox("enter student name")
       c = Application.WorksheetFunction.Match(e, Range("A2:A" & x), False) + 1
       
  For b = 2 To 25
  If Cells(c, b) <> "" Then
  Cells(x + 2 + d, 1) = Cells(c, b)
  d = d + 1
End If
Next b
  MsgBox "complete"
End Sub
ravishankar
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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