Returning only visible data for RANDARRAY

baileyb103

New Member
Joined
Jan 16, 2023
Messages
26
Office Version
  1. 365
Platform
  1. Windows
Hi. I am creating a question bank for a module that is made up of multiple class studies. I have created the full question bank and I am using RANDARRAY function to return a random test paper. Initially I just wanted to create an end of module test but now I've been asked if I can use the bank to create random tests for each class study. I have attempted this by adding in a column with the class study number for each question and filtering, but the RANDARRAY returns results from all the data not just the visible data. Is there anything I can add to the formula or do to the sheet to only return data from the visible cells? The current formula looks like this... =INDEX(SORTBY(C2:F118,RANDARRAY(ROWS(C2:F118))),SEQUENCE(H1),{1,2,3,4})
 
Sorry I've not retried yours as yet...I'll try it and let you know...my app might have updated to allow that function
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
In what way didn't the formula I suggested work?
Thank you @Fluff your is working on my home laptop...I'll try tomorrow on my works laptop which is a closed intranet so I'll have to see if the Excel app supports it. But thank you.
 
Upvote 0
Ok (y)
If you don't have the TAKE function at work, let us know & it can be reworked.
 
Upvote 0
Ok (y)
If you don't have the TAKE function at work, let us know & it can be reworked.
Would I be able to add it using the VBA things? (I have done my 1st of these today on another task I've got going on).
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Good morning,

Fluff thank you for your help with the above formula it is working a right treat. I do however now have another question about adding a feature to the sheet.

Do you know if it is possible to select 'x' amount of questions from User Group 1, 'y' amount of questions from User Group 2, 'z' amount of questions from user group 3, whilst still only selecting from the filtered options?

The reason for this is the course is progressive so they will need knowledge from previous user groups, but still focus the main efforts on the current user group, for example when they are on user group 3, they could have a 30 question paper with 5 questions from user group 1, 5 questions form user group 2, and 20 questions from user group 3.
 
Upvote 0
As this is a totally different question, it needs a new thread. Thanks
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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