Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Changing Multiple Formulas

Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Changing Multiple Formulas

Hi,

What is the formula?


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"John Pivot Table" wrote:

Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Changing Multiple Formulas

I think this macro may do what you want...

Sub FixFormulas()
Dim C As Range
For Each C In Selection
C.Formula = "=IF(B4="""",""""," & Mid(C.Formula, 2) & ")"
Next
End Sub

Just change the B4 cell reference to whatever cell you want to test for
empty, then select all the cells you want to make this change to and then
run the macro. You might try this out on a copy of your worksheet first as
the changes it makes cannot be undone.

--
Rick (MVP - Excel)


"John Pivot Table" wrote in
message ...
Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas
shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Changing Multiple Formulas


Are all the original formula same?
Can you show the original formula and the changed formula

This might need a marco to do it.



"John Pivot Table" wrote:

Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Changing Multiple Formulas

Every cell has a different formula, but I need almost every single one to
start like this:

=IF($B16="","",ORIGINAL FORMULA)


Hopefully the B16 will change according to the row...



"Shane Devenshire" wrote:

Hi,

What is the formula?


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"John Pivot Table" wrote:

Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Changing Multiple Formulas

Worked great, Rick!

Thanks!


"Rick Rothstein" wrote:

I think this macro may do what you want...

Sub FixFormulas()
Dim C As Range
For Each C In Selection
C.Formula = "=IF(B4="""",""""," & Mid(C.Formula, 2) & ")"
Next
End Sub

Just change the B4 cell reference to whatever cell you want to test for
empty, then select all the cells you want to make this change to and then
run the macro. You might try this out on a copy of your worksheet first as
the changes it makes cannot be undone.

--
Rick (MVP - Excel)


"John Pivot Table" wrote in
message ...
Hi,

I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas
shouldn´t
display anything at all.

Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.

thanks!



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Changing Multiple Formulas

On Dec 6, 4:36*am, John Pivot Table <John Pivot
wrote:
Every cell has a different formula, but I need almost every single one to
start like this:

=IF($B16="","",ORIGINAL FORMULA)

Hopefully the B16 will change according to the row...



"Shane Devenshire" wrote:
Hi,


What is the formula?


--
If this helps, please click the Yes button


Cheers,
Shane Devenshire


"John Pivot Table" wrote:


Hi,


I have a file with literally hundredths of formulas and I need to do the
same change in all of them; if a certain cell is empty the formulas shouldn´t
display anything at all.


Is there any way I can change all formulas at once???? I cannot click and
drag because every formula does a different thing.


thanks!- Hide quoted text -


- Show quoted text -


Try this macro,

Sub AddIf()

For Each C In Selection
C.Formula = "=IF(B16=""""," & Right(C.Formula, Len(C.Formula)
- 1) & ",0)"
Next C
End Sub

Hope this help

cheers
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
Changing Multiple Formulas stevieboy1313 Excel Worksheet Functions 1 August 25th 08 09:34 PM
Changing Multiple Cell Formulas zephyr Excel Discussion (Misc queries) 3 May 14th 07 06:35 PM
Formulas Changing Richard Excel Discussion (Misc queries) 0 April 13th 07 03:32 PM
Changing Multiple Formulas japc90 Excel Discussion (Misc queries) 4 December 27th 06 08:24 PM
Changing multiple formulas at one time poorsister Excel Worksheet Functions 2 January 6th 06 04:41 PM


All times are GMT +1. The time now is 11:56 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"