+ Reply to Thread
Results 1 to 6 of 6

Counting number of values in a column against a text/numeral in 2 other columns.

  1. #1
    Registered User
    Join Date
    04-07-2014
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    3

    Counting number of values in a column against a text/numeral in 2 other columns.

    I am trying to count number of times "Collected" appeared in Column C when Column A equals "Brick" and Column B has a non zero entity.

    The return value cell is in another excel file.



    A B C
    Brick 1 Collected
    Brick 4 Dispatched
    Stone 6 Dispatched
    Brick 0 Collected

    The return value should be 1.

  2. #2
    Forum Contributor
    Join Date
    02-20-2014
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Counting number of values in a column against a text/numeral in 2 other columns.

    =countifs(A:A,"Brick",B:B,"<>0",C:C,"Collected")

    Edit: Didn't see the 'other excel file' bit. Just change the column references to the other file. eg. instead of A:A, use '[workbook name]Sheetname'!A:A
    Last edited by cffndncr; 04-08-2014 at 12:47 AM.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Counting number of values in a column against a text/numeral in 2 other columns.

    cff, OP's profile indicates 2003 - the "ifS" functions only work from 2007 onwards, I think they will need to use sumproduct() instead. something like...
    =sumproduct(((A2:A100="Brick")*(B2:B100>0)*(C2:C100="Collected"))
    (untested)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    04-07-2014
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Counting number of values in a column against a text/numeral in 2 other columns.

    Thankyou. It worked. The only problem is, that if I have the main file opened [containing Columns A B and C, Call it Data.xlsx], it gives me the value in the "other" file. [Call it "Summary.xlsx. But if I have opened only Summary.xlsx, then it won't give me the value.
    Last edited by noor_ain; 04-08-2014 at 01:20 AM.

  5. #5
    Registered User
    Join Date
    04-07-2014
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Counting number of values in a column against a text/numeral in 2 other columns.

    Thankyou. This formula worked as well.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Counting number of values in a column against a text/numeral in 2 other columns.

    I notice that the countifS() seems to have worked for you. This indicates 2007 or later (.xlsx), but your profile says 2003. Please update your profile as necessary, members tailor questions based on your excel version

+ 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. Counting number of columns that contain a certain text string
    By dvrs in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-18-2013, 10:11 AM
  2. [SOLVED] Counting unique values (text or number) in one column
    By djaurit in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-06-2012, 03:13 PM
  3. Replies: 4
    Last Post: 09-01-2012, 05:50 PM
  4. [SOLVED] Taking only the numeral values from a cell and no text
    By Bearack in forum Excel General
    Replies: 4
    Last Post: 06-26-2012, 12:03 PM
  5. Counting the number values in a column which is dynamic
    By nynamyna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2011, 10:35 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