Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert text RC formula in a cell
Hi
i need to pick up a text formula (in RC format without equal sign) from lookup table based on set of different paramenters and apply it to the datatable (about 50K rows) for specific columns using formula within a cell without looping using VBA.. for example lookup table might look like that: AAA then formula RC3+RC25*RC30 ABC then formula RC2/RC20*RC4 i tried to break the process on two steps using intermedia column with lookup formula to bring text RC formula into dataset table and then in calculated column convert it into formula so that Excel can recognize and does calc ..But i can't find the way to convert without using VBA and looping through the whole column (50K rows takes a tons of time to do so) in the code I can loop through the whole dataset one by one using VLookUP, assing RC formula found in the lookup table to a variable : strFormula=Vlookup(A1, LookupTable-Range, 2, false) and then attach it to a each specific cell : Cell.formula= "=" & strFormula. How i can achive it in the cell without a code ? cheers D. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert text RC formula in a cell
You can not achieve it in a cell without the code.
but you don't have to loop if the formula will be the same for every row strFormula=Vlookup(A1, LookupTable-Range, 2, false) Range("F2:F50000").FormulaR1C1 = "=" & sStrFormula -- Regards, Tom Ogilvy "Dim" wrote in message om... Hi i need to pick up a text formula (in RC format without equal sign) from lookup table based on set of different paramenters and apply it to the datatable (about 50K rows) for specific columns using formula within a cell without looping using VBA.. for example lookup table might look like that: AAA then formula RC3+RC25*RC30 ABC then formula RC2/RC20*RC4 i tried to break the process on two steps using intermedia column with lookup formula to bring text RC formula into dataset table and then in calculated column convert it into formula so that Excel can recognize and does calc ..But i can't find the way to convert without using VBA and looping through the whole column (50K rows takes a tons of time to do so) in the code I can loop through the whole dataset one by one using VLookUP, assing RC formula found in the lookup table to a variable : strFormula=Vlookup(A1, LookupTable-Range, 2, false) and then attach it to a each specific cell : Cell.formula= "=" & strFormula. How i can achive it in the cell without a code ? cheers D. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
convert text RC formula in a cell
"Tom Ogilvy" wrote in message ...
You can not achieve it in a cell without the code. but you don't have to loop if the formula will be the same for every row strFormula=Vlookup(A1, LookupTable-Range, 2, false) Range("F2:F50000").FormulaR1C1 = "=" & sStrFormula -- Regards, Tom Ogilvy "Dim" wrote in message om... Hi i need to pick up a text formula (in RC format without equal sign) from lookup table based on set of different paramenters and apply it to the datatable (about 50K rows) for specific columns using formula within a cell without looping using VBA.. for example lookup table might look like that: AAA then formula RC3+RC25*RC30 ABC then formula RC2/RC20*RC4 i tried to break the process on two steps using intermedia column with lookup formula to bring text RC formula into dataset table and then in calculated column convert it into formula so that Excel can recognize and does calc ..But i can't find the way to convert without using VBA and looping through the whole column (50K rows takes a tons of time to do so) in the code I can loop through the whole dataset one by one using VLookUP, assing RC formula found in the lookup table to a variable : strFormula=Vlookup(A1, LookupTable-Range, 2, false) and then attach it to a each specific cell : Cell.formula= "=" & strFormula. How i can achive it in the cell without a code ? cheers D. Tom, the way U suggested does not create any benefit as i would need to LOOP through each row at least once : if I put lookup formula into intermedia column (assume F): Vlookup(RC1, LookupTable-Range, 2, false) i will bring RC formula from lookup into datatable that formula is still TEXT...to attach it to "=" i HAVE to HAVE use vba loop to assing that text to string (strFormula) and for each row that string is different, which means I will be forced for the following: for each cl in RangeColumn-F cl.offset(0,1).formula="=" & strFormula (that's what i'm trying to do avoiding code) next cl your way won't make a trick Range("F2:F50000").FormulaR1C1 = "=" & sStrFormula unless u tell me that Range("G2:G50000").FormulaR1C1 = "=" & RC8 can be worked out (column F contains text RC formula which we can use in column G) cheers D. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert Text to a Formula | Excel Discussion (Misc queries) | |||
how convert cell formula value to text | Excel Worksheet Functions | |||
How do I convert a text array to a concatenated text cell? Excel. | Excel Worksheet Functions | |||
how to convert a formula into text in order to display the formula | Excel Discussion (Misc queries) | |||
Convert text in cell to a range name for formula | Excel Worksheet Functions |