Results 1 to 3 of 3

Thread: [RESOLVED] Excel matrix counting. need VBA

  1. #1
    New Member
    Join Date
    Sep 12
    Posts
    2

    Resolved [RESOLVED] Excel matrix counting. need VBA

    Desperately need a VBA to read data from first sheet and report result to second sheet. Basically code will count the number of cells that have a non-zero quantity and report result to sheet 2. There are 14 columns in all. Each column is further divided into five different status fields that needs to be individually counted as well. Good luck- Thanks!
    Attached Files Attached Files

  2. #2
    New Member
    Join Date
    Sep 12
    Posts
    2

    Re: Excel matrix counting. need VBA

    here is an explanation in case it is confusing.

    The RawDataSheet has 14 columns (D:Q) populated with CONTAINER NUMBERS; if we take the first CONTAINER NUMBER 'IHJo8' in column D for example and filter out both the blank cells and the 0 quantity cells you will be left with the following quantities: 0-VERY GOOD, 2-GOOD, 2-BAD, 1-QUESTIONABLE, 0-NOTRATED. And that is the result that is transfered to ResultSheet Row 2. please let me know if it makes any sense. I am getting desperate for a solution and i am not sure why i am not getting any replies. Thanks.
    the first picture is result after the macro is ran.
    the second picture is BEFORE Macro is ran.
    the third picture shows column D filtered to show the quanitites being counted in the explaination above. thanks.
    Attached Images Attached Images    
    Last edited by databased; Sep 20th, 2012 at 03:20 PM. Reason: to explain the pictures

  3. #3
    PowerPoster
    Join Date
    Dec 04
    Posts
    18,520

    Re: Excel matrix counting. need VBA

    I am getting desperate for a solution and i am not sure why i am not getting any replies.
    replies come when members have time to look, also the forum website is performing so poorly it is hard to read threads at all, i could not access at all last night

    can you not use a sumif worksheet function in the second sheet
    i can not see, from your pictures, where you get your results, though maybe some columns are not visible
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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