+ Reply to Thread
Results 1 to 2 of 2

creating a frequency histogram in VBA

  1. #1
    Registered User
    Join Date
    04-20-2007
    Posts
    5

    Question creating a frequency histogram in VBA

    Book1.zipPlease see the attached Excel file. Below the matrix there is a list of cities and their distances. At the bottom of the list is the sum of the total distances. If you highlight two successive cities (for example, cities 5 & 6 or 2&3 or 8 & 9) and press the "swap cities button" the order changes and so does the total distance. I want to create a histogram that keeps track of the number of iterations. That is, the number of iterations on the x axis and the total distance on the y axis. I want the graph to update automatically everytime the "swap cities" button is pressed. Can someone please help me?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Does this help?

    I bullet proofed some of the code above as well to prevent error being thrown when the button was pressed for non intended selections.
    Attached Files Attached Files
    Martin

+ 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