Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replacing DirectPrecedents in a Formula

Hello,

I need to copy a formula to a different sheet where the
DirectPrecedents positions are different. I can get the
DirectPrecedents from the source using the DirectPrecedents property.
I have the corresponding mapping of these DirectPrecedents in the
target.

Is there a way using the Excel Model to replace these DirectPrecedents
using the mapping I have or I have to parse the source and modify the
target accordingly.

Thanks and Regds
Gap
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Replacing DirectPrecedents in a Formula

Gap,

I'm not sure exactly what your question is. DirectPrecendents is a
read-only property, and any change in the would need to be done by changing
the cell references used in the formula. Depending on your specific
situation, you *might* be able to use the INDIRECT function to accomplish
what you want, but without more information, it is impossible to say.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Gappodi" wrote in message
om...
Hello,

I need to copy a formula to a different sheet where the
DirectPrecedents positions are different. I can get the
DirectPrecedents from the source using the DirectPrecedents property.
I have the corresponding mapping of these DirectPrecedents in the
target.

Is there a way using the Excel Model to replace these DirectPrecedents
using the mapping I have or I have to parse the source and modify the
target accordingly.

Thanks and Regds
Gap



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replacing DirectPrecedents in a Formula


Chip,

If my formula is "=SUM(A1:A5)" I need to replace this with say
"=SUM(A11:A15)". I have the mapping available with me in this case A1 -
A11 and A5 - A15.

I was looking for nice way of doing this without having to parse the
formula and replace the references based on the mapping.

Thanks for your reply

Regds
Gap.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Replacing ISERROR Formula Ismael R Excel Worksheet Functions 6 March 5th 09 10:13 PM
replacing value in formula from outside worksheet? Mike[_4_] Excel Discussion (Misc queries) 4 March 24th 08 10:17 PM
help on replacing this formula Abbey Normal Excel Discussion (Misc queries) 6 August 23rd 07 05:17 PM
replacing text within a formula jimswinder Excel Worksheet Functions 5 January 22nd 07 08:16 AM
Replacing a value within a string using a formula solo_razor[_17_] Excel Programming 2 October 30th 03 09:46 AM


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