+ Reply to Thread
Results 1 to 2 of 2

picking a random cell from the visible

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Copenhagen,Denmak
    MS-Off Ver
    Excel 2010
    Posts
    1

    picking a random cell from the visible

    Hi all,

    I am a total Excel beginner, and have run into a problem, that i hope you can help me with.

    I have a few excel sheets with costumer names, and I need to take a random sample from the different costumer segments ( total like 2000 names )

    What i did was first to split them up into segments by adding a column, where i addressed the different segments a letter: I,F,B or R and then set up a filter to easily separate the different costumers.

    What I would like to do now is to take a random costumer from the visible segment to use in the upcoming survey.

    my idea was to do an =INDEX(vis(B2:B480;RANDBETWEEN(1;COUNT(vis(B2:B480)))

    sort of to get excel to index the visible cells between B2 and B 480, then give me a random one of this between the 1 and the number of visible cells.

    i did get the vis function to work, by adding some VBA but i cant get the entire function to work - any ideas of what I could do ? or what I am doing wrong ? i did try a lot of different options, so the ones i have described here was just the one that i think was easiest to understand what I am after.

    hope you can help

    best

    Anders

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: picking a random cell from the visible

    Upload a sample sheet showing what you have, what you want and some idea of how you expect to gete there,(vis is not a built-in excel function, but if they are grouped by a common criteria, that can still be achieved without VBA)

    Dred
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1