Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to turn a string into a formula?
I want to reference another sheet's cell contents based on a randomly
generated row number. So I do the following: Say cell B1 has the formula "=INT(RAND()*10)" to generate a random row number. Say the generated random number is 5. Based on this I try to get the cell contents from another sheet with this equation = ="Sheet1!A" & B1 But this formula ends up returning the string "Sheet1!A5" which is correct, but like I said it returns a string and not a formula to grab the cell contents of another sheet. Anyone know how to make this string a formula? tia, Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to turn a string into a formula?
Ray,
Try =INDIRECT("Sheet1!A"&B1) -- HTH RP "rocky" wrote in message ... I want to reference another sheet's cell contents based on a randomly generated row number. So I do the following: Say cell B1 has the formula "=INT(RAND()*10)" to generate a random row number. Say the generated random number is 5. Based on this I try to get the cell contents from another sheet with this equation = ="Sheet1!A" & B1 But this formula ends up returning the string "Sheet1!A5" which is correct, but like I said it returns a string and not a formula to grab the cell contents of another sheet. Anyone know how to make this string a formula? tia, Ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you turn off the formula bar? | New Users to Excel | |||
Want formula to turn to value by itself | Excel Discussion (Misc queries) | |||
Turn Off Formula ? | New Users to Excel | |||
Turn OFF Formula Bar??? | Excel Programming | |||
Create a formula into a String then assign string to a cell | Excel Programming |