+ Reply to Thread
Results 1 to 4 of 4

Random telephone numbers

  1. #1
    Registered User
    Join Date
    09-10-2003
    Location
    London, UK
    Posts
    38

    Random telephone numbers

    Hi,

    I have a telephone list at work that I work on. In some cells there's more than one extension number shown so, for example, in cell B10 there is:

    23109, 23146, 23148

    This is great, except people mainly call the first number in the list, which can be a bit annoying!

    Is there any way to randomise these 3 numbers in that cell so that it shows a different number every time the worksheet is opened?

    Thanks,
    Dan.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    Here is a way to change it every day:

    =IF(MOD(DAY(TODAY()),3)=0,23109,IF(MOD(DAY(TODAY()),3)=1,23146,23148))

    This changes on every recalculation of the sheet:

    =IF(ROUNDDOWN(RAND()*3,0)=0,23109,IF(ROUNDDOWN(RAND()*3,0)=1,23146,23148))

    To change it every time the workbook opens will take VBA and can be disabled if the sheet is opened with Macros turned off.

    HTH

    Bruce
    Last edited by swatsp0p; 05-04-2005 at 10:08 AM.
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    09-10-2003
    Location
    London, UK
    Posts
    38
    This is great, thanks. I'll probably use the second one, which seems to do the trick.

    Thanks very much,
    Dan.

  4. #4
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    You're welcome, Dan. Glad I could help.

    Cheers!

    Bruce

+ 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