L
Legacy 143009
Guest
Hi,
It was very difficult for me to find out on google to get a cell's formula itself as string as another cell's value with a single lineof code. There were many solutions that didn't work for me.
One single line of code worked for me was to add "'" before formula:
which doesn't seem to be that elegant to me.
The only single line of code worked for me was the following one which seems to be legit also:
I just wanted to share my experience. I hope someone will benefit that, too.
Take care
It was very difficult for me to find out on google to get a cell's formula itself as string as another cell's value with a single lineof code. There were many solutions that didn't work for me.
One single line of code worked for me was to add "'" before formula:
Excel Formula:
Ref2.Value = "'" & Ref1.Formula
The only single line of code worked for me was the following one which seems to be legit also:
VBA Code:
Ref2.Value = Format(Ref1.Formula, "'@")
I just wanted to share my experience. I hope someone will benefit that, too.
Take care