Randomly Assigning Sales Reps

%3CLINGO-SUB%20id%3D%22lingo-sub-1882305%22%20slang%3D%22en-US%22%3ERandomly%20Assigning%20Sales%20Reps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882305%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHello!%20-%20See%20attached%20for%20a%20sample%20sheet.%20I%20am%20randomly%20assigning%20sales%20representatives%20to%20contacts%20in%20a%20spreadsheet.%20The%20trick%20is%20that%20there%20are%20multiple%20contacts%20under%20the%20same%20account.%20How%20can%20I%20%3CSTRONG%3Eevenly%3C%2FSTRONG%3E%20assign%20my%20representatives%20to%20accounts%20but%20ensure%20that%20two%20representatives%20%3CSTRONG%3Edo%20not%3C%2FSTRONG%3E%20get%20the%20same%20account%3F%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F360420%22%20target%3D%22_blank%22%3E%40PReagan%3C%2FA%3E%20%3Anerd_face%3A%3Araising_hands%3A%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1882305%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1882369%22%20slang%3D%22en-US%22%3ERe%3A%20Randomly%20Assigning%20Sales%20Reps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882369%22%20slang%3D%22en-US%22%3EThe%20best%20way%20would%20be%20to%20create%20Account%20IDs%20for%20an%20IF%20function%20to%20reference%20when%20applying%20the%20RANDBETWEEN%20syntax%20(combined%20with%20INDEX)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1882607%22%20slang%3D%22en-US%22%3ERe%3A%20Randomly%20Assigning%20Sales%20Reps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1882607%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867049%22%20target%3D%22_blank%22%3E%40smm10094%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20understand%20what%20you're%20asking%2C%20I%20would%20create%20a%20unique%20list%20of%20account%20names%20and%20randomly%20assign%20sales%20reps%20evenly%20to%20the%20individual%20accounts.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20you%20could%20use%20excels%20randbetween%20function%20to%20assign%20sales%20reps%2C%20but%20it%20would%20require%20a%20circular%20reference.%20I%20attached%20a%20workbook%20as%20an%20example%20with%20some%20instructions.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1884271%22%20slang%3D%22en-US%22%3ERe%3A%20Randomly%20Assigning%20Sales%20Reps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1884271%22%20slang%3D%22en-US%22%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867265%22%20target%3D%22_blank%22%3E%40adversi%3C%2FA%3E%20Can%20you%20give%20an%20example%20of%20the%20formula%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1887343%22%20slang%3D%22en-US%22%3ERe%3A%20Randomly%20Assigning%20Sales%20Reps%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1887343%22%20slang%3D%22en-US%22%3E%3CP%3E.%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F867049%22%20target%3D%22_blank%22%3E%40smm10094%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eif%20we%20assume%20Casper%20Heating%20is%20Account%20ID%201%2C%20then%20the%20formula%20would%20be%20broken%20in%20two%20sections%3C%2FP%3E%3CP%3ECell%20A2%20would%20be%20the%20start%20with%20no%20condition%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DINDEX(%24F%244%3A%24F%246%2CRANDBETWEEN(1%2CROWS(%24F%244%3A%24F%246))%2C1)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEvery%20cell%20after%20A2%20would%20have%20the%20condition%20to%20review%20previous%20results%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(D3%3DD2%2CA2%2CINDEX(%24F%244%3A%24F%246%2CRANDBETWEEN(1%2CROWS(%24F%244%3A%24F%246))%2C1))%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAn%20important%20note%20is%20that%20two%20new%20columns%20should%20be%20made%20to%20finalize%20the%20dataset.%26nbsp%3B%3C%2FP%3E%3CP%3E1.%20TRIM%20the%20Account%20Names%20to%20make%20the%20data%20uniformed%20and%20automatically%20remove%20additional%20white%20spaces%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20Account%20IDs%20that%20you%20link%20using%20VLOOKUP%20or%20INDEX%2FMATCH%20to%20get%20the%20reference%20for%20the%20IF%20syntax%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello! - See attached for a sample sheet. I am randomly assigning sales representatives to contacts in a spreadsheet. The trick is that there are multiple contacts under the same account. How can I evenly assign my representatives to accounts but ensure that two representatives do not get the same account? 

 

@PReagan

4 Replies
The best way would be to create Account IDs for an IF function to reference when applying the RANDBETWEEN syntax (combined with INDEX)

@smm10094 

 

If I understand what you're asking, I would create a unique list of account names and randomly assign sales reps evenly to the individual accounts.

 

I think you could use excels randbetween function to assign sales reps, but it would require a circular reference. I attached a workbook as an example with some instructions. 

@adversi Can you give an example of the formula?

.@smm10094 

if we assume Casper Heating is Account ID 1, then the formula would be broken in two sections

Cell A2 would be the start with no condition:

 

=INDEX($F$4:$F$6,RANDBETWEEN(1,ROWS($F$4:$F$6)),1)

 

Every cell after A2 would have the condition to review previous results:

 

=IF(D3=D2,A2,INDEX($F$4:$F$6,RANDBETWEEN(1,ROWS($F$4:$F$6)),1))

 

 

An important note is that two new columns should be made to finalize the dataset. 

1. TRIM the Account Names to make the data uniformed and automatically remove additional white spaces

 

2. Account IDs that you link using VLOOKUP or INDEX/MATCH to get the reference for the IF syntax