+ Reply to Thread
Results 1 to 6 of 6

COUNTIF and VLOOKUP in one formula

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    7

    COUNTIF and VLOOKUP in one formula

    Hi everyone!

    I have 2 worksheets

    Worksheet1 contains employee names and date, time, and the type of error they committed. My Worksheet2 pretty much looks like this:

    Error 1 Error 2 Error 3
    Employee 1
    Employee 2
    Employee 3

    Basically I want excel to look for Employee 1 in worksheet 1 and count how many times that employee committed Error 1, Error 2, Error 3 and so on and give me that number in my worksheet2.

    I've been trying a formula with Vlookup and Countif but it doesn't work. I really appreciate it if somebody can point me to the right direction... or formula!

    Cheers!

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: COUNTIF and VLOOKUP in one formula

    I notice you are using Excel 2010. You can use COUNTIFS for this purpose.

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

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    7

    Re: COUNTIF and VLOOKUP in one formula

    Thank you but I tried it and this doesn't work for me

  4. #4
    Registered User
    Join Date
    06-26-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    7

    Re: COUNTIF and VLOOKUP in one formula

    This is the formula I've been trying

    =COUNTIF(VLOOKUP(E3,'Worksheet1'!E561:R1965,5,FALSE)="Error 1")

    If I am to translate what I want excel to do in words, I want it to look up for the name of employee (E3) in Worksheet1, check in column 5 of that worksheet (where the errors are listed) and COUNT the number of time the employee's name (E3) appeared ONLY IF it is equal to Error 1 and put that number in my worksheet 2

    Example: in Worksheet 2 the name ANNA BANANA is in cell E3, now ANNA BANANA committed 30 errors in a month; Several Error 1, a few Error 2 and some Error 3

    I wanted to know exactly how many Error 1 she committed, but if I use a countif formula alone what excel does is it counts all occurrences of Error 1 in worksheet 1 so I was trying to incorporate a vlookup in the formula and I'm not getting anywhere.

  5. #5
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: COUNTIF and VLOOKUP in one formula

    I am talking about COUNTIFS not COUNTIF. So deducing from your formula, the formula should be...

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

  6. #6
    Registered User
    Join Date
    06-26-2015
    Location
    Manila, Philippines
    MS-Off Ver
    2010
    Posts
    7

    Re: COUNTIF and VLOOKUP in one formula

    Got it! Thank you!

+ 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. COUNTIF & VLOOKUP Formula Issues
    By xcelhelp in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2013, 04:11 PM
  2. [SOLVED] SUMIF/VLOOKUP/COUNTIF type formula needed
    By liam_bettinson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-26-2012, 03:54 AM
  3. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  4. VLOOKUP and COUNTIF in the same formula
    By Stepper in forum Excel General
    Replies: 5
    Last Post: 11-04-2010, 09:16 PM
  5. Countif or Vlookup
    By praveen_khm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2006, 04:17 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