Yes/No Result when looking up data in a Matrix on separate worksheet

SMHOWARD

New Member
Joined
Feb 6, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hello Mr Excel Users!

New here so apologies ahead of time if I miss something but my brain is a bit fried trying to figure out how to do this.

So I have a Skills Matrix where I am trying to verify if a few hundred users are assigned specific skills with a Yes or No result based on a lookup from a table similar to below.
There are no column headers here, just the users' names to the left and which skills they have in the proceeding cells. There are duplicates of users names but the row may have different skills than the line above it with the same user.
We'll call this WorkSheetA
2023-02-06_15-49-19.png


What I am trying to do is the following. On a separate work sheet, WorkSheetB, we have all the possible skills listed as headers. In WorkSheetB I would like to check if the User in A2 has the Skill in B1 based on the Matrix from WorkSheetA. I want just a simple Yes or No if the skill appears in the matrix on WorkSheetA.
2023-02-06_15-44-39.png


I just can't wrap my head around the IF's and AND's here combined with needing to some sort of Lookup function.
It needs to be able to be dragged down and across as well as there are 150 users and 430 possible skills they could have.

Is this possible in Excel or do we need a more advanced data analytics tool?

Thank you for looking into my issue!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Hi & Welcome to MrExcel!

Try

Search Multiple Text with Sumproduct.xlsx
ABCDEFGHIJKLMNOPQR
1UserUserSkill 1Skill 2Skill 3Skill 4Skill 5Skill 6Skill 7Skill 8Skill 9
2MickeySkill 4Skill 1Skill 5Skill 3MickeyYesNoYesYesYesNoNoNoNo
3DonaldSkill 8Skill 9Skill 5N/ADonaldNoNoNoNoYesNoNoYesYes
4GoofySkill 6Skill 7Skill 2N/AGoofyNoYesNoNoNoYesYesNoNo
5MinnieN/AN/AN/AN/AMinnieNoNoNoNoNoNoNoNoNo
6
7
8
Sheet1
Cell Formulas
RangeFormula
I2:Q5I2=IF(SUMPRODUCT(--ISNUMBER(SEARCH($B$2:$E$5,I$1)/($A$2:$A$5=$H2))),"Yes","No")


Note:
You will need to put N/A, where the data is blank like I have put in row 5 and column E.
Otherwise you will get wrong results.
 
Upvote 1
Solution
Upvote 2
Perhaps a VBA option...
VBA Code:
Sub SMH()
Dim i As Long, j As Long, k As Long, arr() As Variant, lastrowA As Long, lastcolA As Long, wsA As Worksheet
Dim wsB As Worksheet, lastcolB As Long, lastrowB As Long, x As Long, y As Long

Set wsA = Sheets("WorkSheetA")
Set wsB = Sheets("WorkSheetB")
lastrowA = wsA.Range("A" & Rows.Count).End(xlUp).Row
ReDim arr(wsA.Range(Cells(2, 2), Cells(lastrowA, 500)).SpecialCells(xlCellTypeConstants, 2).Count)
MsgBox UBound(arr)
i = 1

For j = 2 To lastrowA
    lastcolA = wsA.Rows(j).Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
    For k = 2 To lastcolA
        If wsA.Cells(j, 1).Value <> "" And wsA.Cells(j, k).Value <> "" Then
            arr(i) = wsA.Cells(j, 1).Value & wsA.Cells(j, k).Value
            i = i + 1
        End If
    Next k
Next j

lastrowB = wsB.Range("A" & Rows.Count).End(xlUp).Row
lastcolB = wsB.Rows(1).Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column

For x = 2 To lastrowB
    For y = 2 To lastcolB
        If Not IsError(Application.Match(wsB.Cells(x, 1).Value & wsB.Cells(1, y).Value, arr, 0)) Then
            wsB.Cells(x, y).Value = "Yes"
        Else
            wsB.Cells(x, y).Value = "No"
        End If
    Next y
Next x

End Sub
 
Upvote 1
Wow I was not expecting so many quick responses! Thank you all! It looks like @Sufiyan97 response worked for what I needed but I'm going to keep these other options in my OneNote as alternates in case I get larger data sets or something. I really appreciate you all!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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