+ Reply to Thread
Results 1 to 8 of 8

COUNTIFS in VBA

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    COUNTIFS in VBA

    Hi All,

    Could anyone help me... I need to refer to Sheet number rather than name and despite research, I can't figure it out.

    Thank you!

    Please Login or Register  to view this content.
    Last edited by warp765; 02-22-2020 at 11:04 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: COUNTIFS in VBA

    Replace Sheets(2) with " & Sheets(2).Name & " wherever it occurs.

    Note, that's double quotes ampersand Sheets(2).Name ampersand double quotes
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: COUNTIFS in VBA

    Hi TMS, thanks for the reply. Could you tell what ampersand means?

  4. #4
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: COUNTIFS in VBA

    An example would be appreciated as the below still seems wrong in my module...

    Please Login or Register  to view this content.

  5. #5
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: COUNTIFS in VBA

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: COUNTIFS in VBA

    Thanks BMV, working great

  7. #7
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: COUNTIFS in VBA

    However
    Please Login or Register  to view this content.
    is preferred
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Re: COUNTIFS in VBA

    Thanks BMV, I've made the change.

+ 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] Countifs+Countifs only when certain criteria met
    By coach.32 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-05-2019, 08:34 AM
  2. Replies: 6
    Last Post: 03-19-2019, 09:14 PM
  3. [SOLVED] Sumproduct to replace countifs as countifs don't work on external source reference
    By KrishnaSagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-02-2017, 02:33 AM
  4. How can I run CountIfs + CountIfs without double counting?
    By hiitsjessie in forum Excel General
    Replies: 1
    Last Post: 02-06-2017, 04:49 PM
  5. COUNTIFS OR COUNTIFS needs to work
    By joshbellfi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 10:55 AM
  6. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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