If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Macro to change all formulas.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-06, 22:26
Jay59 Jay59 is offline
Registered User
 
Join Date: Sep 2006
Posts: 162
Macro to change all formulas.

I have a table that is 50x50 so it has 2500 fields. Each field has a formula.

ex. =TRANSPOSE(Data!B11:B15)

Lets say i want to change ever number by addine 50 to it

so it looks like this

=TRANSPOSE(Data!B61:B65)

Any ideas on how I could do this?

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-18-06, 00:13
myle myle is offline
(Making Your Life Easy)
 
Join Date: Feb 2004
Location: New Zealand
Posts: 1,143
what about just a find and replace
__________________
hope this help

See clear as mud


StePhan McKillen
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment:
Access based on my own environment: DAO3.6/A97/A2000/A2003
VB based on my own environment: vb6 sp5
ASP based on my own environment: 5.6
VB-NET based on my own environment started 2007
SQL-2005 based on my own environment started 2008
MYLE
Reply With Quote
  #3 (permalink)  
Old 09-18-06, 00:17
Jay59 Jay59 is offline
Registered User
 
Join Date: Sep 2006
Posts: 162
the formulas are all differant

=TRANSPOSE(Data!B11:B15)
=TRANSPOSE(Data!B16:B20)
=TRANSPOSE(Data!B21:B25)
=TRANSPOSE(Data!B26:B30)

Thast just 4 of them.


It took me about an hour to do one page. I have 24 more to do

I wanted to automate it as much as possible.

Last edited by Jay59; 09-18-06 at 00:21.
Reply With Quote
  #4 (permalink)  
Old 09-18-06, 15:46
Jay59 Jay59 is offline
Registered User
 
Join Date: Sep 2006
Posts: 162
Can anyone else think of a better way to copy the page and edit the formula, without doing each one manually?

Can you edit an array formula one array at a time?
Reply With Quote
  #5 (permalink)  
Old 09-18-06, 19:58
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
I assume you are wanting to do this with VBA.

You define the Row number, then add a constant to that. If you want the person to decide what that constant is, you can Dim it as Long, then include an InputBox line so that the user can determine what to add to each.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
  #6 (permalink)  
Old 09-18-06, 23:03
taurus taurus is offline
Registered User
 
Join Date: Jul 2005
Posts: 39
Would this help? insert 50 rows above the table.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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