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.

NamesTest 1Test 2Test 3Test 4Test 5
JohnTest 3
PeterTest 1Test 3Test 4
MaryTest 2Test 3Test 5
BobTest 1Test 3
MarkTest 2Test 3Test 4

<tbody>
</tbody>

Thanks.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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