How do I randomly choose from a list in Excel?
So let's say that I want to create a fake listing of bank transactions. I want all 1000 transactions to happen at 1 of four branches:
1. Eastern Ave
2. Wall Street
3. 112th Ave
4. Broadway
How do I tell Excel to pick from my list of 4 branches and populate the list?
Here's my take
There are multiple ways to do it using rand function - based on probability distribution etc.
However for the sake of a single-cell formula to fill the list: =IF(RANDBETWEEN(1,4)=1,"Eastern Ave",IF(RANDBETWEEN(1,4)=2,"Wall Street",IF(RANDBETWEEN(1,4)=3,"112th Ave","Broadway")))
And you basically want to hard copy the list (special paste value) to another tab/sheet to avoid the list changing everytime you refresh the worksheet.
Cheers
Maybe this is a bit more elegant and easier to expand: - Assume your branch locations are in E4:E7 - Use formula: =INDIRECT("E"&RANDBETWEEN(4,7))
i'm going to try this when i'm back at the office, thanks euro
i had seen solutions that looked more like hswc but I was thinking there had to be a more simplistic way
Eligendi deleniti quas ut sunt ab. Temporibus tempora quisquam vero animi. Laborum id at magnam omnis. Vero consectetur sunt minus nostrum.
Voluptatem ut culpa delectus vitae amet omnis sunt harum. Ea nihil eaque deleniti iure mollitia aut illo. Beatae aliquid magni sit et. Tempore at consequatur praesentium maxime harum. Sed rerum quia fugit cum aspernatur molestiae. Accusantium aut mollitia sit quo et minus excepturi. Doloribus ut totam delectus culpa quisquam aperiam ea praesentium.
Eligendi velit maxime laudantium reiciendis quis et ab. Voluptates beatae dolorum animi dicta tempora nisi. Vel veniam illum rerum.
Cum quibusdam modi voluptates sit est. Eum rerum cumque autem odit.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...