#### VLOOKUP and RAND question

```Hi,

I have a question regarding the VLOOKUP, RAND, and maybe IF function
in Excel. I would greatly appreciate it if anyone can help with m
problem. I have 2 columns of data and would like to use a formula fo
Column 3.

Column 1 = numbers 1, 2, 3
Column 2 = numbers 500, 1000, 1500 associated with Column 1

I would like Column 3 to use the RAND function to randomnly pick fro
the numbers in Column 1, then return the value in Column 2. I'm no
sure how to do this.

Since there is equal probability of the numbers in Column 1 to appear
can I just use the RAND function for Column 2 and skip the first step
mentioned?

--
Message posted from http://www.ExcelForum.com

```
 0
3/7/2004 5:39:53 PM
excel.misc 78881 articles. 5 followers.

1 Replies
352 Views

Similar Articles

[PageSpeed] 12

```As long as your numbers in column 2 are mapped 1 to 1 with numbers in
column 1 (e.g., no duplicates in column 1 with differing numbers in
column 2), you can use:

=INDEX(B:B,RAND()*COUNTA(B:B)+1)

In article <deacs.12re4f@excelforum-nospam.com>,
deacs <<deacs.12re4f@excelforum-nospam.com>> wrote:

> Hi,
>
> I have a question regarding the VLOOKUP, RAND, and maybe IF functions
> in Excel. I would greatly appreciate it if anyone can help with my
> problem. I have 2 columns of data and would like to use a formula for
> Column 3.
>
> Column 1 = numbers 1, 2, 3
> Column 2 = numbers 500, 1000, 1500 associated with Column 1
>
> I would like Column 3 to use the RAND function to randomnly pick from
> the numbers in Column 1, then return the value in Column 2. I'm not
> sure how to do this.
>
> Since there is equal probability of the numbers in Column 1 to appear,
> can I just use the RAND function for Column 2 and skip the first step I
> mentioned?
>
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>
```
 0
jemcgimpsey (6723)
3/7/2004 5:53:52 PM

Similar Artilces:

Question
I have theis table sereial room type Name JoinKey 1 DBL absfcii 1 2 DBL gfgfh 1 3 SNGL kkjjjk 2 4 SNGL sdjfksd 2 The Question Is How can i count DBL in JoinKey 1 as (ONE) Only How can I count SNGL in JoinKey 2 as (ONE) Only This SQL will do it. It assumes that the tablename is tblRooms. Note that you should not have a field named NAME. Change it to something like RmName. I also ...

using a date in vlookup
i want to perform a vlookup using the Now() function to generate the lookup value (A1), the 1st column in the table [col B] array will be all the dates in a year listed consequtive,, and the 2nd column being a value assigned to each day in the 1st column [B]. My formula is vlookup(A1,B1:C367,2). The result I get is "#N/A. What am i doing wrong? Thanks Tonso NOW() returns both the date and the time, so you would be better off using TODAY(), which only returns the date. Another problem might be that your dates in column B are really text values that just look like dates - see what happe...

File Share Witness
Please help me understand something - I think I get the concept of using a file share witness in CCR, however, I have read that it is suggested that this server also be a Hub Transport Server. How can this be if a Hub Server is not cluster aware? Isn't the file share witness server configured to be part of the cluster? On Jan 31, 12:25 pm, PM <P...@discussions.microsoft.com> wrote: > Please help me understand something - I think I get the concept of using a > file share witness in CCR, however, I have read that it is suggested that > this server also be a Hub Transpor...

Recovery Partition Question
A friend had a system crash and resinstalled windows 7 using the factory disk. They selected the option to create a recovery partition. All was well but they were not paying attention after it was created and when they went to install programs and save programs they saved and installed them on the recovery partition. It is now almost full. Can he remove or delete files he does not need ? If so what should remain? Also is there a way to block this from happening in the future. Thanks Nash55 ...

Moving mailbox question
I am moving mailboxes between exchange 5.5 to Exchange 2003. I've noticed after the move, in Exchange 5.5, the mailbox still exist. Shouldn't the mailbox be deleted or removed from exchange 5.5? Thanks how, exactly, are you moving them? -- Susan Conkey [MVP] "sean" <nosean@noemail.gmail.com> wrote in message news:Orrizb8FHHA.5000@TK2MSFTNGP03.phx.gbl... >I am moving mailboxes between exchange 5.5 to Exchange 2003. I've noticed >after the move, in Exchange 5.5, the mailbox still exist. Shouldn't the >mailbox be deleted or removed from e...

CRM3.0 Question on Activity
Hello, I am using CRM3.0. I have the following case. 1. Create Campaign 2. Add contact to campaign list 3. Create Campaign activity - Phone call 4. Distribute activity 5. CRM User will make phone call 6. When contact is interest, CRM user will make a "Free Trail" for contact. I am having troble in step 6. So far as I know, I have two choices for "Free Trail". A) Service Activity If I choose to create a service activity, then I can not link up the service activity with the campaign or phone call. B) Appointment If I choose appointment, I can set "regarding"...

2 more questions
First of all thanks to all of you who helped me with my workbook. I have 2 more questions to ask: 1. cell F2 has a SUM formula. I would like the formula to go automatically to F3 but this ONLY if A3 is not empty and to F4 if A4 is not empty and so on. Is it possible? 2. at the end of the day all data inserted in Sheet 1 go automatically to a hidden sheet and is deleted from sheet 1. is it possible to create a macro or whatever which can restore the SUM formula in F2 etc (as above)? Thanks again for your help Try this in F2: =IF(A2<>0,SUM(A2:E2),"") And drag down to...

vlookup excel and access...
assuming i have this code, is possible to use this vlookup withnthe adta into mdb access?... old scenario: Private Sub TextBox25_Change() Dim CODICE As Integer Select Case Me.TextBox25 Case "" Me.TextBox4 = "" Case 1 To 8 CODICE = Val(Me.TextBox25) Me.TextBox4 = Application.WorksheetFunction.VLookup _ (CODICE, Worksheets("TABELLA").Range("Q2:R9"), 2, False) Case Else Call MULTI_LINE_BOX End Select End Sub new scenario: Inested column Q and R in excel i have created a mdb into: \\my server\myserverdir\USER.MDB and into this mdb have inserte a table U...

Drop Down Question
At one point, I think I read dynamic drop down would be possible with crm 3.0. Is this true? If so, can you link me to some documentation or sample code in how I can do this? Let me describe what I’m trying to accomplish. I’m looking to propagate a referrals drop down based on the challenges records in a custom entity I created. So, the parent drop down would provide a list of the distinct challenges. When one is selected, it would fill the referral drop down with all the referrals available with a challenge type of the parent drop down. Possible? Thanks for your help! ...

Payroll Question
Could somebody that's a little more into payroll than I am help me out here. At the end of the year, does the previous payroll year have to be closed and the W-2's printed before checks for the next year can be cut? -- Japheth Nolt Microsoft SBF Specialist Landis Computer www.landiscomputer.com 8/22/2007 10:26:03 AM You do not have to print W2s before you process payroll runs in the new year. You do have to run the routine to create the year end file before you process W2s or do transactions in the new year. The year end processing articles have a lot of details on steps. -- Ch...

Vlookup within a vlookup
I am trying to lookup a cell within a table - but the table to use is found in another table. =VLOOKUP(B3,VLOOKUP(B2,F3:G9,2,2),2) Cell B2 is a dropdown box allowing one of the choices in colum f below. Column G represents which table to use for the initial lookup based on your choice in the drop down dox. column f column g Alt A 30 Yr fixed30 Alt A 15 Yr fixed15 All I get is an error - can someone help ? Thanks, Yosef It sounds like you would need to use INDIRECT within the lookup formula http://tinyurl.com/czxtt that thread shows the way to do it exce...

Lost on Vlookup, match, etc....
Can someone walk me through this please? I a workbook that imports a years worth of data from filemaker to be analyzed and charted in excel. It contains several sheets, but I am concerned with worksheet 1 (daily data) and worksheet 2 (bodyweight). Daily data contains the raw data I pull in from Filemaker. It results in a table with a row for each day of the year. It has 12 columns, but in this instance, I am only interested in 2 of the colums Column F, (Date), and Column R (Bodyweight). There is only one entry per week for body weight. The bodyweight sheet has 3 columns (week #, date, and w...

Column width and pasting sections in excel? Formatting questions
I am trying to make a spreadsheet in which I need to have varied column widths in different sections, one under another. (they don't need to relate directly, and no major equations going on) for example: xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxxxx|xxxxxxxxxx xxxxxxx|xxxxx|xxxxxx xxxxxxx|xxxxx|xxxxxx How do I go about splitting the sheet or whatever I need to do so I can manipulate columns differently based on the row I'm in? Thanks! Rich Column widths apply to the whole column. You may be able to use merged cells to give the appearance that you want, but I try to stay...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

GAL Name Resolution Questions/Tweaking
OK I'm almost ready for our upgrade to Exchange 2003. When testing here is what I experience. 1) I type in the To field of a new message the name of a distribution list. When I click on the check names button or hit Alt+K, up displays the name of the list as well as all the list members asking for a selection. In other words I type "down", I want the list/group to resolve to Downtown and not would you like Downtown, Julie, Joe, Amy, George, & Mary. 2) When typing in Mo, in the To field of a new message, it only compares names in the GAL and excludes the sender'...

OWA and SSL question
HI, is it just as safe/secure for users to connect to my OWA server on Exchange 2003 with a SSL 128bit certificate issured by my internal CA server than it is by an external company like Verisign? Thanks AW In the last exciting episode, "AW" <anonymous@discussions.microsoft.com> wrote: >HI, is it just as safe/secure for users to connect to my >OWA server on Exchange 2003 with a SSL 128bit certificate >issured by my internal CA server than it is by an >external company like Verisign? Can your internal CA be trusted? If so, yes. "AW" <anonymo...

VLOOKUP problem
I down a list of top 100 stock symbols to Excel and place them in Column A and their rank in Column B (1-100). the next week I download a new list of the top 100 stock symbols and their rank to Column C and D respectively. then I create column E using the function =VLOOKUP(C4,A:B,2,FALSE) Which tels me the rank each stock had last week and if a stock is new this week it puts "#N/A" in the appropriate cell in column E. How do I get the Vlookup function to put "NEW" in column E if the is new to the list and wasn't in the list last week? Ed =if(isn...

RUS question
We are running Win2k3 ent. and Exch 2003 ent with three F/E OWA servers and four B/E servers. We have two domain trees in a signle AD forest. Can one (1) of the Backend servers run two (2) "Recipient Update Services", one for each of the two domains? Clayton On Tue, 8 Mar 2005 22:55:24 -0600, "Clayton Sutton" <none@none.com> wrote: >We are running Win2k3 ent. and Exch 2003 ent with three F/E OWA servers and >four B/E servers. We have two domain trees in a signle AD forest. Can one >(1) of the Backend servers run two (2) "Recipient Update ...

Email account question
I am new to Outlook having recently switched my email from AOL to Outlook 2003. I have set up a primary and 3 secondary email addresses, but all of the incoming emails are all going to the same inbox. Don't each of the email addresses have their own mailbox? It seems odd that everyones emails should all be coming to the same box. Is this the way Outlook works, or am I doing something wrong? Have looked all over the "help" section but can find no answers. Any help would be appreciated. Thanks, RC. You can use rules or Search Folders to move messages to separate folders. --...

VLOOKUP #40
Would like to post data from one worksheet to another. Could you provide a few more details about what exactly you want to do. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "dr" <drivera@opvista.com> wrote in message news:1f1001c52c08\$ad4c33a0\$a601280a@phx.gbl... > Would like to post data from one worksheet to another. ...

combobox and vlookups?
I am trying to add a combobox that when you select from the dropdown menu, the columns nextdoor automatically pull up corresponding data that is related to the selection from the dropdown list. Does this make sense? What do I do to set this whole thing up? (I don't know code). Thanks. -- Message posted via http://www.officekb.com You shouldn't need code for anything you described here. Set up the combobox with the list fill range, if any. Set the linked cell to the desired cell. Then, use the VLOOKUP command in another cell to look for the linked cell from the combo box to lo...

Yet another macro question
This is what I get for trying this on my own. I just want a macro that will insert 2 blank rows at the current cursor position. Sub Insert2Rows() ' ' qrow = ActiveCell.Row Rows(qrow & ":" & grow + 1).Selection.Insert Shift:=xlDown End Sub Any ideas? Thanks! Amy This should be close... Sub Insert2Rows() ActiveCell.Resize(2, 1).EntireRow.Insert End Sub -- HTH... Jim Thomlinson "cvgairport" wrote: > This is what I get for trying this on my own. I just want a macro that will > insert 2 blank rows at the...

VLOOKUP
This is a multi-part message in MIME format. ------=_NextPart_000_0001_01CAC8EE.B1306170 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, I use the VLOOKUP function to pull basic data from external data sheets, currently an example of my command looks like this: =VLOOKUP(\$A5,'[RT NP 67 MF.xls]ODD'!\$A\$1:\$S\$250,\$L\$1,FALSE) The "\$AA%" is the data I am looking up and the "\$L\$1" is a variable to the column I am wishing to insert. The question I am trying to get an answer for concerns...