+ Reply to Thread
Results 1 to 3 of 3

macro for counting with matching criteria of two different options

  1. #1
    Registered User
    Join Date
    05-06-2012
    Location
    melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    macro for counting with matching criteria of two different options

    Hello friends,
    I'm kind of new to programmimg in excel & till now I was trying with help from internet.
    but this problem is big for me to resolve, so looking for experts.
    I need a macro which can count number of enteries based on matching 2 fields & pasting data in another sheet.
    example: I need to count how many A101 has enteries of 3 clr, 4 wht & so on. same with A102 enteries & pasting data in another sheet in tabular form
    A101 1 4 Wht Tghd
    A101 1 4 Wht Tghd
    A101 1 3 Clr
    A101 1 4 Wht Tghd
    A101 1 5 Gry
    A101 1 5 Gry
    A102 1 5 Gry
    A103 1 5 Gry
    I have attached example data(in Xls) which is very small(actual data will be pretty big), "tabular" sheet in attached example is the format I need.
    so table needs to fill up all available materials (3 cle, 4 wht etc) & count number of these corrosponding to A101, A102... & so on.
    Hope I was able to explain in detail.
    thanks guys
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-25-2012
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: macro for counting with matching criteria of two different options

    You could just use a COUNTIFS formula which takes more than 1 type of criteria if you're sure the order quantity will always be 1. If not, then you can use a SUMIFS formula which sums using more than 1 criteria. Attached is an example of the countifs version.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-06-2012
    Location
    melbourne
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: macro for counting with matching criteria of two different options

    Thanks for quick reply mate,
    Yea I tried that option before, problem is number of different materials (3 clr, 4 clr, 4 Wht etc) are not certain for each table.
    It can be sometimes more than 10 different products, so first thing is I need to put in unique products available only to first layout (like A101, A102),
    so it should only list products available to that table & so on.
    I thought may be macro for pivot table but not sure how to build macro for pivot table with matching 2 different criteria..

+ 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