+ Reply to Thread
Results 1 to 5 of 5

Macro to count the numbers of status in sheet1 against the dealer names of sheet2

  1. #1
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Macro to count the numbers of status in sheet1 against the dealer names of sheet2

    Hello Guys,

    I need help in creating a Macro which picks the dealer name present in the Sheet2 (“Filtered Data”) and check the same in the Sheet1 (“Database”).

    If dealer name found then count the different types of status present against that dealer in “Status” Column and entered the same no. of counts in Sheet2 (“Filtered Data”) in their respective columns.

    The same step has to do with “Type” column also of Sheet1 (“Database”).

    If any Dealer Name not found in Sheet1 then Macro should move to next Dealer Name.

    The Sample sheet has been attached for your reference.

    Thanks,
    Attached Files Attached Files
    Last edited by Manish_Gupta; 02-18-2014 at 10:42 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to count the numbers of status in sheet1 against the dealer names of sheet2

    Hi,

    You don't really need a macro when you have simple standard Excel functions available. See attached.

    If you do really need a macro then I'd simply have the macro enter the formulae in B2 & F2 and copy them down and across their adjacent columns.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Re: Macro to count the numbers of status in sheet1 against the dealer names of sheet2

    Hello Richard,

    Many Thanks for simple, wonderful and quick solution.

    Adding a formula will solve my problem.

    But, i was wondering how you can add a formula into a Macro. If possible, then just for my learning and knowledge if you can create a Macro file with adding a formula in it.

    Once again, Many thanks for your help.

    Regards,
    Manish_Gupta

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Macro to count the numbers of status in sheet1 against the dealer names of sheet2

    Hi,

    The following macro will do the same thing. Change the range row refs as appropriate

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-12-2013
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    147

    Re: Macro to count the numbers of status in sheet1 against the dealer names of sheet2

    WOW....Thanks Richard.

+ 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. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  2. [SOLVED] Formula should count sheet1 and show in sheet2
    By [email protected] in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-07-2013, 04:57 AM
  3. [SOLVED] Copy colors / names from Sheet2 to Sheet1
    By Berna11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2013, 10:58 AM
  4. Matching names from sheet2, sheet3, sheet4 with names in sheet1
    By Lynx2x in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-28-2012, 07:51 AM
  5. List Names on sheet2 ,but only names used in sheet1
    By 2Raw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2005, 12:10 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