Need help with creating Dynamic Array solution for exam check

Miron

New Member
Joined
Oct 20, 2009
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Trying to create Dynamic Array solution but its not working.
Column F is regular solution
Column G is DA solution.
and-or-xor-not.xlsx
ABCDEFGHIJKL
1NameExam 1Exam 2Exam 3CourseworkResultDA ResultPass Ctriteria
2Emily57806475%FailPassAverage 1-3 is =>75.00
3Andreas91606981%PassPassCoursework is =>80%
4Jan88748385%PassPass
5Rachel88958976%PassPass
6Alexandra89717492%PassPass
7Jason72898268%PassPass
8Claire55749390%PassPass
9Tony95758186%PassPass
AND 2
Cell Formulas
RangeFormula
F2:F9F2=IF(OR(AVERAGE(B2:D2)>=$L$2,E2>=$L$3),"Pass","Fail")
G2:G9G2=IF(OR(BYROW($B$2:$D$9,LAMBDA(array,AVERAGE(array)))>=$L$2,BYROW($E$2:$E$9,LAMBDA(array,array>=$L$3))),"Pass","Fail")
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
This is solution for simpler test where I check only one result. Its spills successfully.
and-or-xor-not.xlsx
ABCDEFGHIJ
1NameExam 1Exam 2Exam 3ResultDA ResultCheckPass Grade
2Emily578064FailFailTRUE80
3Andreas916069FailFailTRUE
4Jan887483PassPassTRUE
5Rachel889589PassPassTRUE
6Alexandra897174FailFailTRUE
7Jason728982PassPassTRUE
8Claire557493FailFailTRUE
9Tony957581PassPassTRUE
AND 1
Cell Formulas
RangeFormula
F2:F9F2=IF(BYROW(B2:D9,LAMBDA(array,AVERAGE(array)))>=J2,"Pass","Fail")
G2:G9G2=F2#=E2:E9
E2:E9E2=IF(AVERAGE(B2:D2)>=$J$2,"Pass","Fail")
Dynamic array formulas.
 
Upvote 0
You need to use the array form of OR like
Excel Formula:
=IF((BYROW($B$2:$D$9,LAMBDA(array,AVERAGE(array)))>=$L$2)+(BYROW($E$2:$E$9,LAMBDA(array,array>=$L$3))),"Pass","Fail")
 
Upvote 0
Solution
To anyone wondering why this solution works. I found explanation on Microsoft website.
This is the relevant text from MS website.
You can also create array formulas that use a type of OR condition. For example, you can sum values that are greater than 0 OR less than 2500:

=SUM(IF((Sales>0)+(Sales<2500),Sales))

You can't use the AND and OR functions in array formulas directly because those functions return a single result, either TRUE or FALSE, and array functions require arrays of results. You can work around the problem by using the logic shown in the previous formula. In other words, you perform math operations, such as addition or multiplication on values that meet the OR or AND condition.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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