+ Reply to Thread
Results 1 to 6 of 6

vba to count number and place in table.

  1. #1
    Forum Contributor
    Join Date
    11-17-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    365

    vba to count number and place in table.

    Hi,
    I have data in sheet "Employee Data". In Column L i have gender and in column O I have Relation.

    I wants to count the members relatio wise and gender wise and put the numbers in Sheet "Summary"

    Example given in sheet "Example"
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: vba to count number and place in table.

    You cont need VBA for this (you posted in VBA forum)
    B3=COUNTIFS('Employee Data'!$L:$L,Summary!B$2,'Employee Data'!$O:$O,Summary!$A3)
    copied down and across as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    11-17-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    365

    Re: vba to count number and place in table.

    This formula doesnt count Others i.e. Nephew, Brother and Sister on Others category

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: vba to count number and place in table.

    Because those categories do not exist in your table. If you add them to col A, and add my formula, then it will count those as well.

    Saying my formula not counting "nephews", would be the same as saying it doesnt count grandmothers - it's not in the table.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: vba to count number and place in table.

    If you want to lump all non-specific relations under Other, try this...
    =COUNTIFS('Employee Data'!$L:$L,Summary!B$2)-(F10+F6)

  6. #6
    Forum Contributor
    Join Date
    11-17-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    365

    Re: vba to count number and place in table.

    I am looking for VBA.

    Reason being is I have similar data in many format. SO that I can use same VBA for all types of by changing range

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Count specific number in a table when given number appears in same row (modified)
    By Karnik in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 05-10-2015, 04:14 AM
  2. Replies: 2
    Last Post: 04-11-2015, 07:56 AM
  3. Replies: 1
    Last Post: 05-16-2014, 07:34 PM
  4. What is the best way to count the number of clients from a table?
    By VBAhelp3456 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-26-2014, 04:40 AM
  5. Replies: 2
    Last Post: 02-13-2012, 09:03 AM
  6. Pivot Table and Count Number
    By Peeekay in forum Excel General
    Replies: 4
    Last Post: 11-11-2010, 05:31 PM
  7. Place a number filter on a report filter in a pivot table
    By reuben.doetsch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-01-2010, 12:41 PM

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