HELP: How to get random data from a 'table' using 'randbetween'

faizzsheikh

New Member
Joined
May 10, 2013
Messages
19
I have a 2 column 'Table' with some data (alphabets not numbers). I want to generate random data from that table (column 1) into a cell.

I want to use 'Table' because when I add new data to the 'Table'... the random data will automatically consider the new data from the table.


Please help!
 

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.

konew1

Well-known Member
Joined
Oct 17, 2007
Messages
2,288
With your data in a named range, (Name: "TABLE")
=INDEX(TABLE,RANDBETWEEN(1,ROWS(TABLE)))

If you don't want a named range
=INDEX(A:A,RANDBETWEEN(1,COUNTIF(A:A,"<>"&"")))
 
Last edited:

faizzsheikh

New Member
Joined
May 10, 2013
Messages
19
The random generated data also includes the table 'Title', how can we exclude it?

I am using this formula: =INDEX(TABLE,RANDBETWEEN(1,ROWS(TABLE)))
 

konew1

Well-known Member
Joined
Oct 17, 2007
Messages
2,288
The random generated data also includes the table 'Title', how can we exclude it?

I am using this formula: =INDEX(TABLE,RANDBETWEEN(1,ROWS(TABLE)))

Try this,
=INDEX(TABLE,RANDBETWEEN(1,ROWS(TABLE)-1)+1)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,148
Messages
5,835,680
Members
430,375
Latest member
datdog22

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
Top