I would like to return this formula
=IF(G13=0, " ",G13)
to Range("H21").Value but couldn't
Please help!
Thank you.
I would like to return this formula
=IF(G13=0, " ",G13)
to Range("H21").Value but couldn't
Please help!
Thank you.
Last edited by NTB; 09-10-2010 at 11:57 AM.
The .Value is the problem. You would want to use .Formula.
![]()
Range("H21").Formula = "=IF(G13=0, " ",G13)"
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
An error is pointing to ",G13)"
.Formula wouldn't do it.
Please help !!
Last edited by NTB; 09-10-2010 at 10:55 AM.
PS. In this forum it isn't necessary to shout for help.![]()
Range("H21").Formula = replace("=IF(G13=0, # #,G13)","#",chr(34))
Sorry, I copied a little too literally from your post. Better:
![]()
Range("H21").Formula = "IF(G13=0, "" "",G13)"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks