For example...
I can use e.g.
=FORMULATEXT(A9)
in a spreadsheet, and the results can be either
#N/A
or e.g.
='E-W Cross-section'!F7
O.K.
But when I come to use that in VBA, thus -
YourTest = WorksheetFunction.FORMULATEXT(myCell)
I don't know how to use that result, in e.g.
If YourTest = ???? Then
Question :-
What do I use in that expression to represent
#N/A and
#VALUE!
(any others ?)
Pretty please ?
OH !
... and now I find that the Line I gave above -
YourTest = WorksheetFunction.FORMULATEXT(myCell)
... doesn't actually work !
What I am TRYING to achieve is this -
a) Create a spreadsheet
b) Populate it with some "input" - numbers and text
c) add some calculations (and graphs) using those input figures.
Then -
d) create a copy of that Sheet, so I now have "OldSheet" and "NewSheet"
And now the bit that I'm having difficulty with -
e) Run through the NewSheet, and -
If the Cell is empty, ignore it;
if it contains an equation, ignore it;
if it contains a reference to another Cell, ignore it
if it contains a reference to another Sheet, ignore it
BUT - if it contains input ("raw data"), replace that with a reference to the OldSheet
This means that the data is only input once, no matter how many copies of the sheet are made.
Bookmarks