+ Reply to Thread
Results 1 to 4 of 4

I'm confused whether of not to use VBA, macros, or a formula.

  1. #1
    Registered User
    Join Date
    05-27-2010
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    I'm confused whether of not to use VBA, macros, or a formula.

    Hello Forum,

    I'm am starting to learn to use Excel to better serve the statistics people want to know on a website I'm helping out. I know very little about excel programs and the use of macro and visual basic but I am comfortable with MATLAB and some C++ programming.


    I am having problems solving what would seem to be something so easy to do in MATLAB in a large spreadsheet I am working on.


    Attached is a silly file (not near the scale of my actually spreadsheet) I made to help show what my goals would be. I'm working with over 400 'goals'.


    What I am trying to do is calculate the sum of all the X's for a specific "week", and then the percentage complete just below that. In Matlab, I would use an 'if-else loop' inside of a 'for loop' finding the summation of all the cells containing an 'X' character in the I column.


    Also, I would then like to take that sum, and divide it by the total amount of cells in that 'week' in order to find the percentage completed.


    It would also be okay if I had to make each 'week' a separate sheet in excel - that is not a major concern.


    If you have any ideas or suggestions about how this might be done, or need any further details about my problem, any response is dearly appreciated.

    Thanks,
    Andrew
    Attached Files Attached Files

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: I'm confused whether of not to use VBA, macros, or a formula.

    Hi,

    In cell L9 place this:

    Please Login or Register  to view this content.
    In cell L12 place this:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: I'm confused whether of not to use VBA, macros, or a formula.

    See attached file where I used formulas and macro. This is the maro:
    Please Login or Register  to view this content.
    Regards,
    Antonio
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-27-2010
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: I'm confused whether of not to use VBA, macros, or a formula.

    Thank you both so much. You were incredibly quick to answer and were spot on.

    Again - thanks,

    Andrew

+ 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