+ Reply to Thread
Results 1 to 6 of 6

please help me with COUNTIFs

  1. #1
    Registered User
    Join Date
    05-14-2012
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    94

    please help me with COUNTIFs

    Hi again, Iīm back with my next trouble
    Canīt get countifs working
    Please Login or Register  to view this content.
    gives runtime error 1004
    The following code works as it should
    Please Login or Register  to view this content.
    Even this countifs works as I want
    Please Login or Register  to view this content.
    Please help me with a solution
    Best regards
    Peter

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: please help me with COUNTIFs

    The range rngD is one column wide (column A), but rngR is 3 columns (H I and J). They must be the same size.

    Do you mean that you want any of H I or J to equal F3, or for all of them to equal F3 (and how would the formula know?) ?

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-14-2012
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: please help me with COUNTIFs

    Hi Peter, thx for your answer!
    I want to count the cells in H:J that contents F3. Because "F3" is in all three columns

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: please help me with COUNTIFs

    So you probably need 3 separate COUNTIFS, but you need to be careful if F3 could appear in two of the columns on the same row, as that will give rise to double-counts.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    05-14-2012
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: please help me with COUNTIFs

    thanks very much Pete, it helped me a lot
    Hereīs a working code after your guidance:
    Please Login or Register  to view this content.
    No worries F3 will never appear in two of the columns on the same row!

    //Peter

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: please help me with COUNTIFs

    I'm glad you got it working in the end - thanks for the rep.

    Pete

+ 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. Countifs
    By singh1982jeetu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-04-2015, 01:49 PM
  2. [SOLVED] Countifs + Countifs - replacement?
    By JulieQ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-05-2015, 03:02 PM
  3. COUNTIFS OR COUNTIFS needs to work
    By joshbellfi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2013, 10:55 AM
  4. [SOLVED] Need help with COUNTIFS
    By rival2031 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2013, 07:55 PM
  5. 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
  6. [SOLVED] COUNTIFS with OR
    By anteagles20 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2012, 11:18 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