Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Cell Precedents

I would like to determine for particular cells whether

1) they contain a formula
2) they have precedents
3) they have precedents on another sheet
4) they have precedents in another workbook

I can see what seems a longhanded way to determine the above (using
directprecedents method) but I wondered if there were any cute shortcuts?

For example, range("A1").directprecedents.count gives an error if there are
no precedents so I would need an error handling step.

Thanks, Kaval
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Cell Precedents

Kaval,

No shortcuts, just lots of code...
http://makeashorterlink.com/?K1AE311DA

Jim Cone
San Francisco, USA


"Kaval" wrote in message
...
I would like to determine for particular cells whether
1) they contain a formula
2) they have precedents
3) they have precedents on another sheet
4) they have precedents in another workbook
I can see what seems a longhanded way to determine the above (using
directprecedents method) but I wondered if there were any cute shortcuts?
For example, range("A1").directprecedents.count gives an error if there are
no precedents so I would need an error handling step.
Thanks, Kaval

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Cell Precedents

Looks like Jim's code does 1 and 2 fairly exhaustively. For 3, you need to
use the navigate method for precedent arrows to actually determine anything
since the precedents property only returns cells in the same sheet. There's
a utility in my add-in below that will do exactly what you want (with a 30
day free trial).

For 4, I don't think it is possible. You can however, open the other
workbooks and find external references in them (again this is in my
utilities) and see if they match the book you are concerned about.

http://www.enhanceddatasystems.com/E...pandXLHome.htm

Robin Hammond
www.enhanceddatasystems.com

"Jim Cone" wrote in message
...
Kaval,

No shortcuts, just lots of code...
http://makeashorterlink.com/?K1AE311DA

Jim Cone
San Francisco, USA


"Kaval" wrote in message
...
I would like to determine for particular cells whether
1) they contain a formula
2) they have precedents
3) they have precedents on another sheet
4) they have precedents in another workbook
I can see what seems a longhanded way to determine the above (using
directprecedents method) but I wondered if there were any cute shortcuts?
For example, range("A1").directprecedents.count gives an error if there
are
no precedents so I would need an error handling step.
Thanks, Kaval



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
WorkSheet Cell Precedents? Ken Excel Discussion (Misc queries) 4 April 8th 10 01:18 PM
Precedents Abdul Shakeel Excel Discussion (Misc queries) 3 July 25th 08 08:08 PM
Trace Precedents and dependents for a range of cell ? Anand vijay New Users to Excel 1 January 17th 07 08:02 PM
Formula Precedents Brendan Vassallo Excel Discussion (Misc queries) 2 September 11th 06 12:09 AM
Identify precedents to cell in/outside of activesheet Neil Bhandar[_3_] Excel Programming 1 March 3rd 04 01:48 AM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"