+ Reply to Thread
Results 1 to 5 of 5

Is it possible to embed a COUNTIF statement within VLOOKUP?

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Is it possible to embed a COUNTIF statement within VLOOKUP?

    Hello everyone;

    I have two formulas that are currently "housed" on separate sheets that I would like to combine into one, on the second sheet. Both of the formulas below work separately. What I would like to occur is the COUNTIF to be executed if the VLOOKUP is a match (the scenario is, if there is a match on employee name, count the number of "Yes" in the range specified in the COUNTIF formula). Any suggestions?

    The following formula works on the first sheet:
    =IF(COUNTIF('Reviewer Database'!$AE8:BS8,'Reviewer Database'!BT$7)>0,"Yes","No")

    The following formula works on the second sheet:
    =VLOOKUP($B6,'Reviewer Database'!$C8:CH82,70,FALSE)

    Combine the two above into one formula, located on the second sheet (my attempt below does not work):
    =VLOOKUP($B6,'Reviewer Database'!$C8:CH82,MATCH(IF(COUNTIF('Reviewer Database'!$AE8:BE8,'Reviewer Database'!BT$7)>0,"Yes","No"),'Reviewer Database'!$C8:CH82,FALSE))

    Thanks for any guidance!

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Is it possible to embed a COUNTIF statement within VLOOKUP?

    Hi,

    Can you please post a sample excel file here? It's easier to understand the requirement by going through the excel file along with description.

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    Ottawa, Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Is it possible to embed a COUNTIF statement within VLOOKUP?

    Hi, thanks for your reply. I can't for the life of me figure out how/where to attach a file. Can you give me an idea?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: Is it possible to embed a COUNTIF statement within VLOOKUP?

    Ha Ha!! Even when you figure it out, it doesn't always work!!!

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    The paperclip icon
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,137

    Re: Is it possible to embed a COUNTIF statement within VLOOKUP?

    Click "Go Advanced" then "Paper Clip" icon which take into Upload facility

+ 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. Get SQL Table: How to embed a Variable into a Statement?
    By WmBarth in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 08-18-2015, 05:56 AM
  2. Adding CountIf Statement within If/ElseIf Statement
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 05:09 AM
  3. Embed COUNTIF in SUBTOTAL with multiple criteria
    By 2Excel in forum Excel General
    Replies: 5
    Last Post: 05-04-2011, 12:19 PM
  4. If statement and countif statement in an array
    By jntydeman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-26-2011, 12:35 PM
  5. Problem with IF statement within a COUNTIF statement
    By girlofscience in forum Excel General
    Replies: 5
    Last Post: 04-22-2009, 10:20 AM
  6. Combining CountIF and Vlookup funtion in IF Statement
    By Adrian2006g in forum Excel General
    Replies: 1
    Last Post: 11-29-2006, 03:23 PM
  7. [SOLVED] Embed a countif function in subtotal function?
    By Stuck at work in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 11:20 PM

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