LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Changing cell formula in VBA

Hi to all !!


I have a small problem in Excel97, although I don't know if the Excel
version is relevant.

In some of my sheets, I've elaborated some complex formulas which,
sometimes, can lead to
the infamous "#NA" result.

I want to replace the "#NA" by a clean 2 characters "NA" string.

As there are MANY formulas, I want to develop a VBA sub which does the work :

a) pick up the actual formula (which we'll define as FormulaContent)
(maybe save the activecell.address so as to be able to write to
that range)

b) replace it by
IF(ISERROR( FC ),"NA", FC)

WHERE FC is FormulaContent without the preceeding "=" sign


I thank you by advance.
Best regards,

--
Herve Hanuise
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP...Draging cell without changing Formula linked to cell Wilco Excel Discussion (Misc queries) 4 February 5th 11 10:44 AM
changing cell formula specialc Excel Worksheet Functions 1 March 30th 09 06:59 PM
how to edit formula without changing formula of each cell sadat Excel Worksheet Functions 2 April 24th 07 02:02 PM
get the value of a formula in cell B1 into cell A1 without changing my current cell selection News[_4_] Excel Programming 3 October 21st 06 12:24 AM
Changing cell from formula to data. TimM Excel Discussion (Misc queries) 2 January 6th 06 08:35 PM


All times are GMT +1. The time now is 07:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"