What is the general way of storing a formula as a String and Using the String as a Formula again?

prabha_friend

Board Regular
Joined
Jun 28, 2011
Messages
95
The Formula is:

=Sheet2!RC[11]&"" ""&Sheet2!RC[10]

How do I have to store it as a string in a cell?

'=Sheet2!RC[11]&"" ""&Sheet2!RC[10] ?
or
"=Sheet2!RC[11]&"" ""&Sheet2!RC[10] ?
or
"=Sheet2!RC[11]&"" ""&Sheet2!RC[10]" ?
or
=Sheet2!RC[11]&"" ""&Sheet2!RC[10] ? (As a Direct formula only)

How to use the stored string as a formula again (Throug VBA) ?

SomeSheet.SomeColumn.SomeRange.FormulaR1C1 = cell.value ? (Cell.value holds the formula as String)
or
SomeSheet.SomeColumn.SomeRange.Formula = cell.value ?
or
SomeSheet.SomeColumn.SomeRange.Formula = cell.formula ? (This method works for non R1C1 formulas but I don't want to see an unnecessary error field in my mapping file)
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
can you just store a normal formula in a helper cell and use vba to go copy it and paste it wherever required ?
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top