+ Reply to Thread
Results 1 to 13 of 13

Need Small Macro for Counting Total Approved No.s in Given Table

  1. #1
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Question Need Small Macro for Counting Total Approved No.s in Given Table

    Dear All,

    I need small macro for count the total No. of "Approved" with respect to their names. macro should produce the result at "O" column by numerical numbers.

    please suggest any one.

    Thanks in Advance.
    Attached Files Attached Files

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Is a formula also acceptable.. it is very easy to solve with sumproduct() for older excel versions

    change the contents of N column with only the names and then use this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    also see attachment
    Attached Files Attached Files

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Another option !!
    Please Login or Register  to view this content.
    Regards Mick

  4. #4
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Try.
    HTML Code: 
    Best Regards,
    Maras.

  5. #5
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Hi Roel, Thank you formula working but some cases my file with merged cells as attached example sheet. can you please share the formula for this situation?
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Try.
    HTML Code: 

  7. #7
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Quote Originally Posted by maras_mak View Post
    Try.
    HTML Code: 
    Thank you, can you please formula version for this merged cell condition.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Quote Originally Posted by Roel Jongman View Post
    Is a formula also acceptable.. it is very easy to solve with sumproduct() for older excel versions

    change the contents of N column with only the names and then use this formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    also see attachment
    Thank you so much your formula version. it is simple and effective. can you please modify for merged cell condition. i have attached sample sheet,
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Quote Originally Posted by structo
    I need small macro for count ...
    My code works very well even on merged cells.

  10. #10
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Quote Originally Posted by maras_mak View Post
    My code works very well even on merged cells.
    Yes but i need formula version too for merged cell, please share.

  11. #11
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    When you have merged cells then you need to make sure that the first column of the merged cells is mentioned in the formula

    so in this case G instead of H

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Quote Originally Posted by Roel Jongman View Post
    When you have merged cells then you need to make sure that the first column of the merged cells is mentioned in the formula

    so in this case G instead of H

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thank you for modification, i have tried but got different results comparing with actual results. please have a look and guide me.

  13. #13
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Need Small Macro for Counting Total Approved No.s in Given Table

    Behind the names James and Steve there is a still a space. if you remove the space then they will match. So you need to be accurate with the spelling of the names incl spaces you cant see.

+ 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] Finding last row of Pivot table not counting Grand total
    By chad.portman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-18-2014, 11:57 AM
  2. Replies: 4
    Last Post: 06-17-2014, 08:39 AM
  3. [SOLVED] Vba macro code for counting total days above 32 deg temp, 33, 34, and goes on..
    By Dharani Suresh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2013, 03:17 AM
  4. [SOLVED] Not Counting Grand Total from Pivot Table
    By baca25 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-02-2013, 02:16 AM
  5. the MACRO that find last row above the total row in table and add the new row
    By adel58 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2013, 06:25 PM
  6. Formula Help Please for Dates / Approved
    By beckiefm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2012, 08:01 AM

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