Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Macro to update formula

The formula below is in column U in 8 workbooks. Each of these
workbooks has twenty worksheet tabs containing the formula in 20 blocks
of rows within each worksheet. As you can see anytime the formula (An
addition or subtraction of an account # (See below)) changes it is a
task to cut & paste to update the formula.


=IF(AND(COUNT(O18:R18)<0)*(OR($C$4=202,$C$4=2273, $C$4=6401,$C$4=12400,$C$4=12423,$C$4=12703,$C$4=23 840,$C$4=32438,$C$4=34007,$C$4=50116,$C$4=50702,$C $4=50861,$C$4=50874,$C$4=12465,$C$4=61100,$C$4=622 55)),"_____","N/A")

Is there a way to change have a Macro change the formula based on a
sheet that will list the accounts to be used in the formula & then copy
& paste the updated formula into all worksheets in all the workbooks?

Any ideas? Thanks?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Using Macro to update formula

A possible alternative:

First, the AND() isn't doing anything in the formula except
returning the same value that COUNT(O18:R18)<0 returns.

Put your account list in a separate workbook named, say, Accts.xls.
Name the range of accounts "acctlist" - the range can be the entire
column if desired. For the moment, leave it open.

In each of your workbooks, convert the formulas you have now to
something like:

=IF(OR(COUNT(O18:R18)=0, ISNA(MATCH($C$4,Accts.xls!acctlist,0)))
"N/A", "______")

That way you'd only need to update one workbook (Accts.xls) by
adding or deleting an account number, and not change any formulae.


In article ,
STEVEB wrote:

The formula below is in column U in 8 workbooks. Each of these
workbooks has twenty worksheet tabs containing the formula in 20 blocks
of rows within each worksheet. As you can see anytime the formula (An
addition or subtraction of an account # (See below)) changes it is a
task to cut & paste to update the formula.


=IF(AND(COUNT(O18:R18)<0)*(OR($C$4=202,$C$4=2273, $C$4=6401,$C$4=12400,$C$4=12
423,$C$4=12703,$C$4=23840,$C$4=32438,$C$4=34007,$C $4=50116,$C$4=50702,$C$4=508
61,$C$4=50874,$C$4=12465,$C$4=61100,$C$4=62255))," _____","N/A")

Is there a way to change have a Macro change the formula based on a
sheet that will list the accounts to be used in the formula & then copy
& paste the updated formula into all worksheets in all the workbooks?

Any ideas? Thanks?



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

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
Macro update link [email protected] Excel Worksheet Functions 1 February 7th 08 10:32 AM
need help to update macro to office 2007 macro enabled workbook jatman Excel Discussion (Misc queries) 1 December 14th 07 01:57 PM
Update Chart Macro Sal Charts and Charting in Excel 0 August 28th 05 11:21 PM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM
Macro update Rhonda[_2_] Excel Programming 1 September 12th 03 01:11 AM


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