John,
Are you doing Excel automation or just trying to write a formula in an Excel cell?
If automation, you need something like
oExcel.Range("A1").FormulaR1C1 = "= B" + ALLT(STR(nX))
If you're working purely in Excel, try the Microsoft newsgroups (server is msnews.microsoft.com) where the Excel MVPs will take good care of you.
>i hope i won't get in trouble by using this forum to try and solve an excel problem. if i am offending anyone, please accept my appologies.
>
>i need to make a cell number a variable and hope i can explain it clearly. here goes... to produce a result in a cell, i need to take the number in another cell, which will always vary, and add that number to a column letter to make a new cell reference. for instance, say that cell A1 will vary. the number in A1 will be used to reference a row in column B which contains the answer i need in cell C1. if A1=6 then the cell containing the answer i need is B6. normally the formula in C1 would be =B6, but as i said, the number part will vary. how do i add the number in A1 to '=B' in the formula in C1?
>
>many thanx!
>john