+ Reply to Thread
Results 1 to 2 of 2

Macro to Calculate Percent

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2013
    Posts
    87

    Macro to Calculate Percent

    Hello,

    I have been trying to wrap my brain around a problem regarding dividing two columns (in a range), by eachother to create a column for percentages. (ie. Column B/Column C = Percentage in column D).

    The problem is that in one workbook it works GREAT as it uses relative cells. However, in a newer workbook I have it doesn't work properly despite identical code.

    The Code is :
    Please Login or Register  to view this content.
    In this workbook Diabetes test - testingHelp2.xlsm It does not work as it should.

    However, in this workbook it does work Diabetes test - testingHelp2 - Copy (2).xlsm despite identical code

    Things to know:
    - The macro that runs it is called "Report"
    - The code is under the comment "Calculates the Percentage of A1C <= 0.07 within 6 months for each doctor"
    -The percent displays in "sheet2" in column D
    Last edited by foxy_420; 11-19-2012 at 04:20 PM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to Calculate Percent

    Hi

    I think it has to do with the order of the sheets between the 2 workbooks. In the copy (where it works), the first sheet has the raw data (sheet name Diabeties Test) whereas in the non working workbook, the first sheet has a table of contents.

    rylo

+ 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