Results 1 to 4 of 4

COUNTIF - Problems specify the criteria as a range

Threaded View

  1. #1
    Registered User
    Join Date
    01-16-2012
    Location
    Bangkok
    MS-Off Ver
    Excel 2003
    Posts
    2

    COUNTIF - Problems specify the criteria as a range

    Hi I have a problem trying to apply the COUNTIF function.

    Let me explain my difficulties

    I have the following cells with data formatted like this:

    A
    Countries Selected
    Cambodia Thailand Philippines Laos Vietnam Belgium [A2]
    Vietnam Philippines Thailand Cambodia Laos [A3]
    Vietnam Cambodia Thailand Philippines Laos [A4]
    Cambodia Thailand Philippines Laos Vietnam [A5]
    Germany Thailand Cambodia Vietnam Laos Philippines [A6]

    B
    Countries
    Laos
    Cambodia
    Thailand

    C
    Number of Instances


    So basically, I need to count how many times a certain text string, corresponding to column B, (e.g. "Laos" ) occurs in ranges A2-6, and then output the result in column C.

    If I formulate the function in C2 as COUNTIF(A2:A6, "*Laos*), it gives me the correct value, but I want my criteria to reference the countries listed in column B.

    But my formula of COUNTIF(A2:A6, "*B2*) keeps giving me an error.

    Please help!
    Last edited by palmbum; 01-16-2012 at 06:12 AM. Reason: Problem Solved!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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