ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert Text to Formula (https://www.excelbanter.com/excel-programming/288477-convert-text-formula.html)

jurgenC![_2_]

Convert Text to Formula
 
hi all,

looking for assistance on how to convert a text within a cell to a
formula.

i sucessfully created the text for a cell as follow:

C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

now i would like to convert this into a formula so that it reads:

=C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

the piece of code is as follow:

Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 4) = _
"'" & sLocation & "[" &
Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 3) &
"]TestScripts!'E" & iRowS + 2

thanking you in advance for any help and your time.

cheers....


....jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Rob van Gelder[_4_]

Convert Text to Formula
 
jurgenC!,

Use this in your formula.

Offset(iRowD, iPriority + 4).Formula = "=" & _

Rob

"jurgenC!" <jurgen1967ATyahoo.com.au wrote in message
...
hi all,

looking for assistance on how to convert a text within a cell to a
formula.

i sucessfully created the text for a cell as follow:

C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

now i would like to convert this into a formula so that it reads:

=C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

the piece of code is as follow:

Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 4) = _
"'" & sLocation & "[" &
Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 3) &
"]TestScripts!'E" & iRowS + 2

thanking you in advance for any help and your time.

cheers....


...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




jC!

Convert Text to Formula
 
hi Rob,

thanks for your time and input, not too sure if i am doing something
incorrectly, but as soon as i add ' .Formula = "="& ' to the
code, i receive the 1004 error (Application-defined or object-defined
error).

all is well if i only add ' .Formula ' to the code, but as
soon i add the equal sign, the error will appear.

cheers...


....jurgenC!

Rob van Gelder[_4_]

Convert Text to Formula
 
I suspect there's a syntax error with the formula.

Using the old method, let it write a formula to the cell.
Then manually edit the formula and put an = before the text. See if it
accepts it.

Rob


"Rob van Gelder" wrote in message
...
jurgenC!,

Use this in your formula.

Offset(iRowD, iPriority + 4).Formula = "=" & _

Rob

"jurgenC!" <jurgen1967ATyahoo.com.au wrote in message
...
hi all,

looking for assistance on how to convert a text within a cell to a
formula.

i sucessfully created the text for a cell as follow:

C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

now i would like to convert this into a formula so that it reads:

=C:\Documents and Settings\jurgenC\Desktop\QA\[TestCases
(FRD).xls]TestScripts!'E12

the piece of code is as follow:

Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 4) = _
"'" & sLocation & "[" &
Workbooks(sMaster). _
Worksheets("TestScripts"). _
Range("A1"). _
Offset(iRowD, iPriority + 3) &
"]TestScripts!'E" & iRowS + 2

thanking you in advance for any help and your time.

cheers....


...jurgenC!

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!






jurgenC![_2_]

Convert Text to Formula
 
Hi Rob,

how write you were (the error was between chair and keyboard <smirk).
the '-symbol was in the incorrect location.

once again a big thank you for your help and time.

cheers....

...jurgenC!



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


All times are GMT +1. The time now is 02:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com