+ Reply to Thread
Results 1 to 3 of 3

RAND Breakdown

Hybrid View

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Hayes, VA
    MS-Off Ver
    Excel 2010
    Posts
    31

    RAND Breakdown

    The answer to this is probably simple and I'm just missing it.

    I want to generate a random number using RANDBETWEEN(). Then I want to break it into 3 parts and asign a text code to each part. It seems that using the IF function (such as -IF(A1=1,"Th","") for example) does not work on the cell with the parsed number.

    I guess the best way to understand is to look at the attached worksheet.

    (PLEASE- NO MACROS. My workplace does not allow them)

    RAND Breakdown.xlsx

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: RAND Breakdown

    It would be easiest to use a look-up table to translate the values to letters.

    Your IF statment isn't working because when you split the random number, using a string function (LEFT, MID, RIGHT) the portion you return is a string, so while IF(A1=1 won't work IF(A1="1" should

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Hayes, VA
    MS-Off Ver
    Excel 2010
    Posts
    31

    Re: RAND Breakdown

    BINGO! I knew it had to be something simple that I was missing! Thanks Andrew-R !!

+ 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