+ Reply to Thread
Results 1 to 11 of 11

List the cells with data validation rules referring to other sheets/books.

  1. #1
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    List the cells with data validation rules referring to other sheets/books.

    Hello!

    Is something like this already out there? :

    "On a new sheet, list the name of any sheets and those cells which contain data validation rules which refer to values on other worksheets or other workbooks."

    ?

    VR/Lost

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: List the cells with data validation rules referring to other sheets/books.

    hi leaning

    This will list the cells with Data Validation for the active sheet and formulas to the immediate window
    Please Login or Register  to view this content.
    Last edited by pike; 02-06-2011 at 03:21 AM. Reason: remove selects
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: List the cells with data validation rules referring to other sheets/books.

    Pike,

    I put your code in a module (Excel 2003, BTW), and ran it, but I get the Run-time error 1004 (Application-defined or object-defined error.)

    I am not savvy enough in VBA to fix it.

    Any ideas?

    VR/Lost

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: List the cells with data validation rules referring to other sheets/books.

    More properties of the Validation object can be found here...
    http://http://msdn.microsoft.com/en-...ffice.12).aspx

    However here's a concept that may work for you ...

    Please Login or Register  to view this content.
    Last edited by nimrod; 02-06-2011 at 06:41 PM.

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: List the cells with data validation rules referring to other sheets/books.

    Is this an assignment in a VBA-course ?

    @nimrod

    What about:

    Please Login or Register  to view this content.
    Last edited by snb; 02-06-2011 at 07:21 PM.



  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: List the cells with data validation rules referring to other sheets/books.

    It does sound a lot like an assignment to me.

    Since, pre2010 anyway, you can't use direct references to other sheets, you'll need to parse the formulas to see if they are named ranges, then test the referstorange to see where it is. The details I leave to you.
    Remember what the dormouse said
    Feed your head

  7. #7
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: List the cells with data validation rules referring to other sheets/books.

    All,

    I appreciate your help and am giving your codes a try.

    BTW, this is not a assignment question for any class. It is a follow-up to my earlier post http://www.excelforum.com/excel-gene...s-on-list.html

    For some cells, so I don't have to set up the conditional formatting and data validation, I cut-and-paste cells from other workbooks. I am thinking that when I do that, the path gets carried into the current workbook and then perhaps gets added to that Go To list in addition to the Named ranges.

    When I open the workbook using Excel 2010, the compatibility checker gives me the error "One or more cells in this workbook contain data validation rules which refer to values on other worksheets. These data validation rules...."

    But it only tells you the sheet, not the specific cells on the sheet causing the error.

    So I asked that question and am hoping that the codes will reveal any problems.

    HTH!

    VR/Lost

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: List the cells with data validation rules referring to other sheets/books.

    Maybe you'd better look for cells producing errors than cells containing validationlists. A subcategory of specialcells is 'errorproducing' cells.

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: List the cells with data validation rules referring to other sheets/books.

    The compatibility checker in 2010 is flawed and will produce that error if a range is used in a DV list and that sheet is not active when the check runs.

  10. #10
    Valued Forum Contributor
    Join Date
    02-26-2010
    Location
    Chattanooga, TN
    MS-Off Ver
    Excel 2003/2007/2010/2016
    Posts
    432

    Re: List the cells with data validation rules referring to other sheets/books.

    All,

    I really appreciate your help!

    I modified Nimrod's code to include more properties that I wanted to see:

    Please Login or Register  to view this content.

    It doesn't like the OFFSET type of ranges (dynamic, growable). (=OFFSET('Sheet1'!$O$1,0,0,MAX(1,COUNTA('Sheet1'!$O:$O)),1) (It gives those a #VALUE error.)

    But it does show places where I checked "Ignore Blank" for one cell and missed it on others. So, it's a good reporting tool. Thanks!


    snb,

    I tried your code, but am missing something somewhere because it is causing an Error 92 (For loop not initialized):

    Please Login or Register  to view this content.

    romperstomper: Well, that explains some things. Thanks!

    VR/Lost

  11. #11
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: List the cells with data validation rules referring to other sheets/books.

    My code doesn't do anything. It's a suggestion on VBA-structure to Nimrod. (he's probably hunting right now...)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1