Selecting a random name within an IF statement

dms11463

New Member
Joined
May 1, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hello - I have a spreadsheet with about 1500 employees. I need to pick a random employee from the list daily, but ONLY if they have a qualifying "x" in a column on the spreadsheet.

Example: If there is an X in column C, I want to select a random name from column B. If column C is blank - they are not eligible for selection.

I cannot seem to find a solution for this.

Thanks in advance for any assistance
 

Attachments

  • 2024-08-05_11-48-57.jpg
    2024-08-05_11-48-57.jpg
    149.6 KB · Views: 6

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Why does it need an IF statement?

Book1
ABCD
1CompanyFirst NameEligibility
2TEST COMPANYAaliaAggi
3TEST COMPANYAaron
4TEST COMPANYAaron
5TEST COMPANYAbbyX
6TEST COMPANYabigail
7TEST COMPANYabril
8TEST COMPANYAddie
9TEST COMPANYAdela
10TEST COMPANYAdrian
11TEST COMPANYAdrian
12TEST COMPANYAdriana
13TEST COMPANYAdriana
14TEST COMPANYAdriana
15TEST COMPANYAdriana
16TEST COMPANYAggiX
17TEST COMPANYAimee
18TEST COMPANYAJ
19TEST COMPANYAlan
20TEST COMPANYAlbert
Sheet1
Cell Formulas
RangeFormula
D2D2=LET(a,FILTER(B2:B20,C2:C20="X"),INDEX(a,RANDBETWEEN(1,COUNTA(a))))
 
Upvote 0
Solution

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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