Alternative to long IFS

jackcolasu

New Member
Joined
Jan 16, 2025
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have another long IFS, since that's one of the few formulas I know! Each nurse is assigned a letter A, B, or C to indicate who is covering each other. So the B's cover each other, the C's cover each other, and A covers with the Charge Nurse.
1737118908322.png


Yesterday, you helped me create the Primary RN list below. Now, I need the corresponding Secondary RNs transcribed to this list:
1737118996104.png

The names will change every day. The formula I have is below, which basically says if the Primary RN column from above matches E5, then pull B5. If it matches E6, then pull E7. If it matches E7, then pull E6, and so on. Is there something simpler? It's only 5 statements, but I still feel like I'm making it more complicated than it needs to be. Appreciate the feedback!
1737119214277.png
 

Attachments

  • 1737119060538.png
    1737119060538.png
    5.7 KB · Views: 2

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
What do the X's mean and why do Linda/Alice get match up with Yola?
 
Upvote 0
What do the X's mean and why do Linda/Alice get match up with Yola?
The numbers are patient rooms, but that part was already solved so the "assigned patient beds" section doesn't matter. I need Yola's & Lina/Alice's names to be paired with each other every time they appears in this list:
1737131561917.png

Same with Donaldo/Morgan and Frank/Courtney. However, the names and the location of the names change day to day. My IFS formula works, but I wasn't sure if that was the simplest way to achieve my goal. The ABC in the "Break" column indicates who is paired with who. A is always paired with the Charge Nurse, the B's are paired, and the C's are paired. So I need the above list to know that every time the name in E6 (Courtney) appears, E7 (Frank) should appear next to it, since they are both marked "B" in the "Break" column. Same with E5/B5 and E8/E9.
1737131729166.png

My IFS formula may be the best way, but I'm not great with excel so I just wanted to post here to check if there was a better way.
 
Upvote 0
Try:
Book1
ABCDEXYZ
1
2
3
4BreakRNRNSecondary RN
5Charge NurseYolaALinda/Alice*Linda/Alice*Yola
6BCourtneyCourtneyFrank
7BFrankFrankCourtney
8CMorganMorganDonaldo
9CDonaldoDonaldoMorgan
Sheet4
Cell Formulas
RangeFormula
Z5:Z9Z5=LET(b,$D$5:$D$9,r,$E$5:$E$9,XLOOKUP(1,(b=XLOOKUP(Y5,r,b))*(r<>Y5),r,$B$5))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,225,606
Messages
6,185,956
Members
453,333
Latest member
BioCoder84

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