+ Reply to Thread
Results 1 to 2 of 2

macros to count column values based on conditions and display the in a message box

  1. #1
    Registered User
    Join Date
    01-25-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    macros to count column values based on conditions and display the in a message box

    Hi All,

    I am very new to macros and struggling to get column count based on few conditions.

    I have excel file having serveral rows with 5 columns. I need to have macros which can display 4 different buttons & click on these 4 buttons results should displayed in message box based on conditions.

    Ex: sheet look like

    ID Defect ID Priority Type Status
    01 989 P1 Defect opened
    02 234 P3 ND low
    03 124 P2 CR Active
    04 909 P3 ND Active
    05 897 P4 CR CR


    1. First button should give the count of Defect ID ie column 2

    2. Second button should give number of P1/P2/P3/P4 count ie column 3

    3. 3nd button, should give how many numbers P1/P2/P3/P4 of Type Defect/ND/CR

    4. button should display a message on how many P1/P2/P3/P4 are in still opened/low/Active/CR


    Anyhelp please..

    Thanks,
    Viv

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: macros to count column values based on conditions and display the in a message bo

    Why dont you attach a sample workbook? Its easier to understand your columns that way and provide you a solution.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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