Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Add new formula to existing formulas on entire worksheet


Hi! I hope someone can help me with this. I have a worksheet where the
summary sheet pulls info from another 15 worksheets, and we were having
trouble getting the #N/A errors to hide when data wasn't entered into
the cells.

I found a formula that works, and I just need to know how to add it to
the entire sheet, especially since the other cells already contain the
original formula.


Here is an example of what the formula was like befo

=VLOOKUP('VP Summary'!A2,'Air Products'!$A$2:$C$28,3,FALSE)

This is what I had when I managed to add the other formula, and what I
need to do to the several hundred remaining cells:

=IF(ISNA(VLOOKUP('VP Summary'!A2,'Air
Products'!$A$2:$C$28,3,FALSE)),"",VLOOKUP('VP Summary'!A2,'Air
Products'!$A$2:$C$28,3,FALSE))

Any assistance would be greatly appreciated.

Theresa




--
T. Spina
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Add new formula to existing formulas on entire worksheet

To add the ISNA trap formula to all cells.

Select the range of cells then run this macro.

Sub NATrapAdd()
Dim myStr As String
Dim cel As Range
For Each cel In Selection
If cel.HasFormula = True Then
If Not cel.Formula Like "=IF(ISNA*" Then
myStr = Right(cel.Formula, Len(cel.Formula) - 1)
cel.Value = "=IF(ISNA(" & myStr & "),""""," & myStr & ")"
End If
End If
Next
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP



On Wed, 21 Feb 2007 19:01:22 +0000, T. Spina
wrote:


Hi! I hope someone can help me with this. I have a worksheet where the
summary sheet pulls info from another 15 worksheets, and we were having
trouble getting the #N/A errors to hide when data wasn't entered into
the cells.

I found a formula that works, and I just need to know how to add it to
the entire sheet, especially since the other cells already contain the
original formula.


Here is an example of what the formula was like befo

=VLOOKUP('VP Summary'!A2,'Air Products'!$A$2:$C$28,3,FALSE)

This is what I had when I managed to add the other formula, and what I
need to do to the several hundred remaining cells:

=IF(ISNA(VLOOKUP('VP Summary'!A2,'Air
Products'!$A$2:$C$28,3,FALSE)),"",VLOOKUP('VP Summary'!A2,'Air
Products'!$A$2:$C$28,3,FALSE))

Any assistance would be greatly appreciated.

Theresa


Reply
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
applying rounding formula to entire worksheet mateo Excel Worksheet Functions 17 May 15th 23 07:44 PM
How can I use one formula to change case on an entire worksheet? pow835 Excel Worksheet Functions 2 April 4th 06 09:04 PM
Can inserted rows automatically include existing worksheet formula tgdavis Excel Discussion (Misc queries) 2 September 20th 05 09:08 PM
Copy the entire sheet to overlay existing sheet? LurfysMa New Users to Excel 2 August 29th 05 07:05 PM
need a formula to copy entire row to next worksheet aledger Excel Worksheet Functions 5 March 8th 05 12:45 AM


All times are GMT +1. The time now is 10:03 PM.

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"