# Need some help on coming up with random number from 2 excel columns.

#### webuxer

##### New Member
Hi, I need some help in coming up with some random numbers from 2 columns in an excel file.

If you see on the attached file on column F and G there are some numbers. I need to come up with some random numbers and put them in column H. But the number from column F needs to be a few numbers higher (sometimes a number up, or 2 numbers up, up to three numbers up, but they need to be random throughout the whole column, (like I said sometimes 1 or 2 or 3 numbers up). On column G is the same but the numbers need to go down by 1 or 2 or 3 numbers, just random numbers. On the results on the H column the left number needs to be smaller than the right number. If you see on the attached file the first result in column H .428 is lower than .440 (The number on the left needs to smaller. I'm really trying to come out with a formula but I cant figure it out. Its a long list maybe someone can help me on this if is even possible.

### Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},\$Z\$1:\$Z\$99,\$Y\$1:\$Y\$99),2,False) to lookup Y values to left of Z values.

#### bschwartz

##### Well-known Member
Does this work for you?

#### webuxer

##### New Member
Does this work for you?

Excel 2010
FGH
10.4270.4470.429 - 0.445
20.2050.2250.208 - 0.224
30.0530.0730.056 - 0.07
40.0530.0730.055 - 0.07
50.050.070.052 - 0.068

<tbody>
</tbody>
randb

Worksheet Formulas
CellFormula
H1=RANDBETWEEN(1,3)/1000+F1&" - "&-RANDBETWEEN(1,3)/1000+G1

<tbody>
</tbody>

<tbody>
</tbody>
Thank you soo much this is what i needed, can it be possible to be able to have a number on your sample
on Row 3, the result for 0.073, instead of 0.07 be something like 0.071. I would like to keep the same amount of numbers.
Thanks

<table cellpadding="2.5px" rules="all" verdana,="" arial,="" tahoma,="" calibri,="" geneva,="" sans-serif;="" border:="" 1px="" solid="" rgb(187,="" 187,="" 187);="" border-collapse:="" collapse;"="" width=""><tbody></tbody></table>

Last edited:

#### bschwartz

##### Well-known Member
Try this:

=TEXT(RANDBETWEEN(1,3)/1000+F1,"0.000")&" - "&TEXT(-RANDBETWEEN(1,3)/1000+G1,"0.000")

#### webuxer

##### New Member
Thanks you so much for your help, you have answered my question. Thanks for your time. I have another question but I will put it in another thread.
Thanks

#### bschwartz

##### Well-known Member
You're most welcome.

1,106,187
Messages
5,509,707
Members
408,750
Latest member
vdspharma

### This Week's Hot Topics

• Turn fraction around
Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
• TIme Clock record reformatting to ???
Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
• TextBox Match
hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
• Using Large function based on Multiple Criteria
Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
• Can you check my code please
Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
• Combining 2 pivot tables into 1 chart
Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...