Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Replicate Formula Update with VB Function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ExcelMonkey - 30 May 2008 16:09 GMT
I want to build a function which changes a formula string extracted from a
cell.  I need to create an offset-like function for formulas which replicates
what Excel naturally does when you insert rows and columns.

For example if the formula is:

A$1+SUM($A$1:$N$45)-$B4-B9

I want to have to two aspects to the function: row # change and col #
change.  I want to use the function as follows:

var1 = "A$1+SUM($A$1:$N$45)-$B4-B9"

result = RevisedFormula(var1,1,1)

?result
"B$1+SUM($A$1:$N$45)-$B5-C10"

Any ideas on how to do this?

Thanks

EM
ExcelMonkey - 30 May 2008 17:56 GMT
Put another way, I want to replicate in code what Excel actually does when
you PASTE a copied cell to a new destination and the formula natuarlly
updates.  I know I could replicate this by actualy using a temporary
worksheet and pass the formula to a cell and then copy to a new destination,
have Excel update the formula, and then extract the updated formula.  However
I do not want to do this.  I want to keep all of this in code.

Thanks

EM

> I want to build a function which changes a formula string extracted from a
> cell.  I need to create an offset-like function for formulas which replicates
[quoted text clipped - 19 lines]
>
> EM
ExcelMonkey - 30 May 2008 22:01 GMT
Sorry I need to re-post this as it was not clarified properly.

EM

> I want to build a function which changes a formula string extracted from a
> cell.  I need to create an offset-like function for formulas which replicates
[quoted text clipped - 19 lines]
>
> EM
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.