+ Reply to Thread
Results 1 to 4 of 4

If and Countif

  1. #1
    Registered User
    Join Date
    11-13-2008
    Location
    UK
    Posts
    21

    If and Countif

    Hey guys,

    If I have 2 columns in a table such as below and I want to query one of them to find out if a particular number is present I've figured out how to use IF/COUNTIF to do this. However, what I can't do is then get it to paste the corresponding value to the number (in the example below it'd be c).

    Any ideas if I can do this with formulas?

    Thanks!

    =IF(COUNTIF(A1:A12,"3"),"???","MISSING")

    ColumnA ColumnB
    1 a
    2 b
    3 c
    4 d
    5 e
    6 f
    7 g
    8 h
    9 i
    10 j
    11 k
    12 l
    Last edited by losty; 05-18-2015 at 05:53 PM. Reason: Solved.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If and Countif

    Here's my best guess at what you're wanting to do...

    Data Range
    A
    B
    C
    D
    E
    1
    Header
    Header
    ------
    Header
    Header
    2
    1
    a
    3
    c
    3
    2
    b
    4
    3
    c
    5
    4
    d
    6
    5
    e
    7
    6
    f
    8
    7
    g
    9
    8
    h
    10
    9
    i
    11
    10
    j
    12
    11
    k
    13
    12
    l


    This formula entered in E2:

    =IFERROR(VLOOKUP(D2,A2:B13,2,0),"Missing")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    11-13-2008
    Location
    UK
    Posts
    21

    Re: If and Countif

    Perfect, just what I was after.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: If and Countif

    You're welcome. Thanks for the feedback!

+ 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] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  2. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  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. [SOLVED] COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  5. [SOLVED] Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 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