Formula to Search If/Then/Else

SadCowDisease

New Member
Joined
Sep 24, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello all,
I've been trying to create a database for my teams new classes, and I'm running into a syntax issue.
I'm new to excel formulas, and am fresh from beginner Python 3, so it's getting a bit jumbled.
Basically, I have a sheet with raw data on tests passed, failed, and missing, and a place where I want to display who needs to submit/ resubmit what class. Data is split into cells on a back-end page, organized by columns A (class) | B-M (Passed) | N-Z (Failed) | AA-AM (Missing), displaying names of each person in each category.
So what I need is a formula that looks by row, checks the class name against passing students, and if there is a class that doesn't have a given name, then it prints the class name.
Thus far, the best I've made is one that checks class name against missing column for specific names, but I need to be able to also get failed names, and not including passing ones.
Here's what I've gotten thus far, as mentioned above:
=IFERROR(UNIQUE(FILTER('Knowledge Checks'!E:E,'Knowledge Checks'!H:H=C2)),"No Class Missing")
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the MrExcel board!

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

I think to help, somebody would need to be able to set up a dummy set of data in the same manner that you have. From reading your description, I am not able to do that with any confidence. What about a small set of dummy data that shows your layout and any data variations, include your expected results, manually entered in the second sheet and post both with XL2BB so that we can see what you want and also copy your sample data to try to replicate your expected results?
 
Upvote 0
Here's a sample of what I'm working with and an example of the goal I'm aiming for. I've also updated my profile, I'm on Windows with 365.
Thanks!
1664235898366.png
 
Upvote 0
Here's a sample of what I'm working with
Unfortunately, we cannot copy from that to test, which is why I suggested XL2BB. I have typed out the data this time but many helpers will just pass your thread if you don't make it easy for them. ;)

One way to make this nice and easy would be to add an extra column to the original data sheet like this. You can hide the column if you want.

SadCowDisease.xlsm
ABCDENOPQAAABACADAN
1PassedFailedMissingAll Passed
2Class 1AlfredCameronDavidColeWard|Alfred|Cameron|David|
3Class 2CameronDavidColeWardAlfred|Cameron|David|Cole|
4Class 3DavidColeWardAlfredCameron|David|Cole|Ward|
5Class 4ColeWardAlfredCameronDavid|Cole|Ward|Alfred|
Sheet1
Cell Formulas
RangeFormula
AN2:AN5AN2="|"&TEXTJOIN("|",1,B2:M2)&"|"


Then on the other sheet you just need this formula in the cell below the first name and copy across.

SadCowDisease.xlsm
ABCDE
1AlfredCameronDavidColeWard
2Class 2Class 3Class 4Class 1Class 1
3Class 3Class 4Class 2
4
Sheet2
Cell Formulas
RangeFormula
E2:E3,C2:D2,A2:B3A2=FILTER(Sheet1!$A2:$A5,ISERROR(SEARCH("|"&A1&"|",Sheet1!$AN2:$AN5)),"")
Dynamic array formulas.
 
Upvote 0
Hello,
Thank you for your feedback! It's gotten me a lot closer to what I'm after, however I'm seeing where more examples is important. I was able to get Xl22b working, hopefully this uploads correctly. The top section is a similar version of what I'm working with along with an extra section that's the combination of the fail and missing columns for each group, the bottom is the list I'm hoping to get together, and to the right of that is a side note explaining the blue can be ignored as it's there to provide explanation of why there are gaps in the data set column.
The issue I ran into when I tried the solution you provided was that I believe it's counting the blank cells in the dataset. Is there any way to make it skip calculating cells with no names?
Thank you!

Book1
ABCDEFGHIJKLMN
1Raw Data
2ShiftClassMorning PassMorning FailMorning MissingTests NeededAfternoon PassAfternoon FailAfternoon MissingTests NeededEvening PassEvening FailEvening MissingTests Needed
3SwingCalls CG, JP, KK, KBAB, AR, DR, JL, JR, MA, MJ
4GraveCalls CY, DR, JA, MM, SSIF, JT, KH LW
5DayCallsEHAP, CL, DB, FP, JL, JS, KB, MK, MH, MZ, TNAP, CL, DB, FP, JL, JS, KB, MK, MH, MZ, TN
6SwingCalls AB, DR, JL, JRAR, CG, JP, KK, KB, MA, MJ
7DayCallsAP, CL, DB, FP, JS, MH, MZMHEH, JL, KB, MK, TNMH, EH, JL, KB, MK, TN
8GraveCalls IF, JT, KH, LWJTCY, DR, JA, MM, SS
9SwingCalls Mario Ariaga
10DayCallsJL, MK 
11DayReportsCL, EH, FP, JL, MHAP, DB, JS, KB, MK, MZ, TNAP, DB, JS, KB, MK, MZ, TN
12SwingReports CG, DR, JP, JL, KK, KB, MAABAR, JR, MJ
13GraveReports CY, JA, MMDRIF, JT, KH, LW, SS
14DayReportsAP, DB, JS, MK, MZ, TNCL, EH, FP, JL, KB, MHCL, EH, FP, JL, KB, MH
15SwingReports JRAB
16GraveReports CY, DR, IF, JT, KH, LW, SS
17SwingReports AB
18GraveReports LW
19
20Goal: List of failed and missing classes per person^ We can ignore blue data, it's here to show what the raw data looks like, and why there are gaps in the data set
21EHAPCLDBFPJSMHMZJLMKTN
22CallsCalls
23ReportsReports
24
25
26
27
28
29
30
Sheet1
Cell Formulas
RangeFormula
F3:F18F3=TEXTJOIN(", ",TRUE, D3:E3)
A22:A23A22=UNIQUE(FILTER(B3:B18,ISERROR(SEARCH(A21,F3:F18))))
B22:B23B22=UNIQUE(FILTER(B3:B18,ISERROR(SEARCH(B21,F3:F18))))
Dynamic array formulas.
 
Upvote 0
That is very different to what you initially presented & asked for!

the bottom is the list I'm hoping to get together
If that is the case, and it was produced by the formulas shown, what is the question/problem?
 
Upvote 0
That is very different to what you initially presented & asked for!


If that is the case, and it was produced by the formulas shown, what is the question/problem?
Sorry for the poor communication! So what I have is a list of classes and names. What I'm trying to automate is names that are missing from the pass column, or names that are in the Fail/ Missing columns. At the moment, the example version should be searching for the name in both failed and missing columns, then providing the class name for the row in which it finds the name.
At this juncture, following your feedback, the issue I'm coming across is that my dataset has gaps since the data I'm getting involves utilizing some columns but not all of them. I believe with the current formulas in use, it's pulling class names where there is no name feedback at all, and I'm trying to determine how to properly search for this.
 
Upvote 0
So what about some fresh sample data with the actual expected results filled in manually and explain in relation to that sample data how you manually got those results?
 
Upvote 0
Here's the sheet with the Goal section filled in manually. The goal is for this section to auto-populate based on finding the searched for name in the fail or missing ranges.

Missing Class Worksheet.xlsx
ABCDEFGHIJKLMN
1Raw Data
2ShiftClassMorning PassMorning FailMorning MissingTests NeededAfternoon PassAfternoon FailAfternoon MissingTests NeededEvening PassEvening FailEvening MissingTests Needed
3SwingCalls CG, JP, KK, KBAB, AR, DR, JL, JR, MA, MJ
4GraveCalls CY, DR, JA, MM, SSIF, JT, KH LW
5DayCallsEHAP, CL, DB, FP, JL, JS, KB, MK, MH, MZ, TNAP, CL, DB, FP, JL, JS, KB, MK, MH, MZ, TN
6SwingCalls AB, DR, JL, JRAR, CG, JP, KK, KB, MA, MJ
7DayCallsAP, CL, DB, FP, JS, MH, MZMHEH, JL, KB, MK, TNMH, EH, JL, KB, MK, TN
8GraveCalls IF, JT, KH, LWJTCY, DR, JA, MM, SS
9SwingCalls Mario Ariaga
10DayCallsJL, MK 
11DayReportsCL, EH, FP, JL, MHAP, DB, JS, KB, MK, MZ, TNAP, DB, JS, KB, MK, MZ, TN
12SwingReports CG, DR, JP, JL, KK, KB, MAABAR, JR, MJ
13GraveReports CY, JA, MMDRIF, JT, KH, LW, SS
14DayReportsAP, DB, JS, MK, MZ, TNCL, EH, FP, JL, KB, MHCL, EH, FP, JL, KB, MH
15SwingReports JRAB
16GraveReports CY, DR, IF, JT, KH, LW, SS
17SwingReports AB
18GraveReports LW
19
20Goal: List of failed and missing classes per person^ We can ignore blue data, it's here to show what the raw data looks like, and why there are gaps in the data set
21EHAPCLDBFPJSMHMZJLMKTN
22CallsReportsReportsReportsReportsReportsCallsCallsCallsReportsCalls
23ReportsReportsReportsReports
Sheet1
Cell Formulas
RangeFormula
F3:F18F3=TEXTJOIN(", ",TRUE, D3:E3)
 
Upvote 0
Seems to be missing this part.
and explain in relation to that sample data how you manually got those results

For example, why is EH listed for either class since they passed Calls (cell C5) and they passed Reports (cell C11)?
 
Upvote 0

Forum statistics

Threads
1,223,759
Messages
6,174,336
Members
452,555
Latest member
colc007

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