Determine whether an alpha value falls within a range...

merlinCLT

New Member
Joined
Mar 3, 2020
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Greetings, All,

I am using two spreadsheets consisting of the following fields:

1) High school students' school name, first and last names
2) Counselor names and caseload alphabetical ranges

I am trying to create a formula to populate the school counselor's name for each respective student based on the assigned alpha named range for each counselor. Ultimately, I want to be able to mail merge student data with emails to school counselors for their reference.

The actual list I have includes 1000+ records and rather than manually enter the assigned counselor in each cell, I am hoping that someone may have an idea of how to create a function or VBA that would make this process more streamlined.

Student Data

Student_FirstStudent_LastHigh_SchoolAssigned_Counselor
AdamBrownAKHS
JessicaBrownBHS
TommyLeeVHS
AzizAnsariAKHS
MichaelScottVHS
HowiePiersonBHS
LilaThurmondTHS

Counselor Data

Counselor_FirstCounselor_LastHigh_SchoolCaseload
KellyThompsonAKHSA-Moon
MaryBlackBHSA-Kit
GaryBuseyBHSKita-Z
BudShiffmanAKHSMoona-Z
ScottWilliamsTHSAll Students
SusieQuintanoVHSAll Students

Desired Outcome

Student_FirstStudent_LastHigh SchoolAssigned_Counselor
AdamBrownAKHSThompson
JessicaBrownBHSBlack
TommyLeeVHSQuintano
AzizAnsariAKHSThompson
MichaelScottVHSQuintano
HowiePiersonBHSBusey
LilaThurmondTHSThurmond

Thanks, in advance, for any thoughts!
 
Thanks for that,, a slight change to the formula in post#8 it should be
Excel Formula:
=INDEX(Counselors!$D$2:$D$138,AGGREGATE(15,6,(ROW(Counselors!$D$2:$D$138)-ROW(Counselors!$D$2)+1)/(Counselors!$A$2:$A$138=D2)/IF(Counselors!$K$2:$K$138="X",(C2>=Counselors!$E$2:$E$138)/(C2<=Counselors!$F$2:$F$138&"Z"),(Counselors!$G$1:$J$1=E2)/(Counselors!$G$2:$J$138="X")),1))
Thanks, Fluff! I think this should do the trick! I will look forward to giving it a go tomorrow.

Appreciate everyone's contributions!
 
Upvote 0

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.
My original formula really couldn't be adapted to the new requirements, but this should work:

Book1
ABCDEF
1Student_ID#Student_First_NameStudent_Last_NameHigh_SchoolGradeCounselor_Email
222151574MaxBlackmore302 - Ardrey Kell9HYZZB.FYPCAUCLU@abc.xyz
371844409ManveerHensley302 - Ardrey Kell9SPKB.OPKAGYZZ@abc.xyz
420601795KierenLivingston302 - Ardrey Kell9VEPOLAB.MKUUHO@abc.xyz
526801857KacyPalacios302 - Ardrey Kell9VEPF.VPMZY@abc.xyz
634235789JaydnBowes302 - Ardrey Kell10HYZZB.FYPCAUCLU@abc.xyz
772332711MarniChavez302 - Ardrey Kell10ZUKL.FLRLYKCU@abc.xyz
828380377AmaniEdmonds302 - Ardrey Kell10HKLOALZBC.KPSUO@abc.xyz
938567646EvelynHenson302 - Ardrey Kell10SPKB.OPKAGYZZ@abc.xyz
13717510804MarshaMacdonald334 - Cato12HYLAE.OSLAE@abc.xyz
13858147960DaleReeves341 - Cochrane Collegiate Academy9#N/A
13912693285AdenBains341 - Cochrane Collegiate Academy10HYBP.FWCC@abc.xyz
14034406229BradleyBroadhurst341 - Cochrane Collegiate Academy10HYBP.FWCC@abc.xyz
14191233759EllieCarpenter341 - Cochrane Collegiate Academy10HYBP.FWCC@abc.xyz
14261275464AlyssaMolloy341 - Cochrane Collegiate Academy10HYBP.FWCC@abc.xyz
14372457337Alfie-LeeWalmsley341 - Cochrane Collegiate Academy10HYBP.FWCC@abc.xyz
14418911914MiltonDelgado341 - Cochrane Collegiate Academy11FUCAÉ.EPKKLO@abc.xyz
14552547398FoxHayes341 - Cochrane Collegiate Academy11FUCAÉ.EPKKLO@abc.xyz
Students
Cell Formulas
RangeFormula
F137:F145,F2:F9F2=INDEX(Counselors!$D$2:$D$30,MATCH(4,(D2=Counselors!$A$2:$A$30)+(C2>=Counselors!$E$2:$E$30)+(C2<=Counselors!$F$2:$F$30&"ZZ")+(Counselors!$K$2:$K$30="X")+(OFFSET(Counselors!$G$2:$G$30,0,E2-9)="X"),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,758
Messages
6,126,706
Members
449,331
Latest member
smckenzie2016

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