+ Reply to Thread
Results 1 to 6 of 6

Cyclomatic Complexity

  1. #1
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Cyclomatic Complexity

    Is there a VB script that can determine the Cyclomatic Complexity of an Excel spreadsheet? More specifically the spreadsheet functions and not VBA.

    Thanks!

    Last edited by Bob1980; 10-11-2011 at 04:30 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,882

    Re: Cyclomatic Complexity

    I suggest you Google: Cyclomatic Complexity of an Excel spreadsheet.

    I don't understand the question, let alone the answers.

    There are, however, several links returned so have a look and see if any help.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Re: Cyclomatic Complexity

    Yeah, that was one of the first things I did. Unfortunately, most of the hits refer to pages that provide the output of this analysis tool in excel; rather then analyzing excel by itself.

    There is one posting that I found, but I am not sure if the VBA code measures the cyclomatic complexity of the VBA Script in an excel spreadsheet or the functions in the spreadsheet. Unfortunately for me, the industry I am in is not allowed to use VBA.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,843

    Re: Cyclomatic Complexity

    Just my $0.02 but cyclomatic complexity measures procedural code. Excel is a different beast and I don't know how you would even apply it. An Excel spreadsheet can have an arbitrary number of independent paths. Would you propose to measure each path and come up with a consolidated number of some kind?

    Edit: What complexity would you assign to an Excel function? Do you count the number of range references, and then count as a step each time a range reference resolved to a cell with another formula? Just trying to figure out how you could possibly apply this to Excel. Another complication is that (modern) procedural code has a single entry point but an Excel spreadsheet does not have an entry point.
    Last edited by 6StringJazzer; 10-11-2011 at 08:55 PM.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

    Re: Cyclomatic Complexity

    I think the cylomatic complexity of your question is -0.
    You are looking for a VB script (your first post) for an industry that uses MS office (your fist post) but doesn't allow VBA (your second post).
    So why using computers and software in the first place ?



  6. #6
    Forum Contributor
    Join Date
    09-13-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    111

    Re: Cyclomatic Complexity

    RE: 6StringJazzer

    Thanks for your input. I am new to programming, and you raise a lot of good points. I'm really just looking for ways to analyze my spreadsheet, and also find techniques that will help me find the bugs.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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