+ Reply to Thread
Results 1 to 4 of 4

Referencing a cell to count multiple columns in another sheet

  1. #1
    Registered User
    Join Date
    04-02-2014
    Location
    queenstown, new zealand
    MS-Off Ver
    office 2013
    Posts
    4

    Referencing a cell to count multiple columns in another sheet

    Hi there,

    Perhaps easier if I provide an example as i'm not so good at explaining myself in excel speak..

    In sheet 'Stock Codes', for each stock in column A, I am trying to find out how many times the Mkt Val (MM) of the Stock Code in sheet 'Holdings' is more that zero. The Mkt Val (MM) column is repeated multiple times. For the first stock code '2330-TW' I have highlighted the cells in Orange that I would like to count, and you can see that out of 25 highlighted, 20 of them are greater than zero (and this is the number I would like in column B of the 'stock codes' sheet). I think i need to combine some kind of lookup formula with a COUNTIF but I can't work out how.

    I'm no good at VBA/macros so as simple a formula as possible would be great. I would also like to make no changes to the 'Holdings' sheet if possible as this is downloaded from another source and updated on a regular basis, however the columns will always be in the same order.

    thanks so much for any help/advice you can give.

    Steve.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Referencing a cell to count multiple columns in another sheet

    Maybe

    =COUNT(IF((Holdings!$A$11:$A$1707=A2)*(Holdings!$C$7:$CX$7="Mkt Val"),Holdings!$C$11:$CX$1707))

    Array Formula --> you need to confirm press CTRL-SHIFT-ENTER button together when you applied the formula, Not ENTER alone...

    And your table has "--" try to remove it and replace with blanks or 0, to avoid formula missed counting
    Last edited by azumi; 04-06-2014 at 09:50 PM.

  3. #3
    Registered User
    Join Date
    04-02-2014
    Location
    queenstown, new zealand
    MS-Off Ver
    office 2013
    Posts
    4

    Re: Referencing a cell to count multiple columns in another sheet

    wow, that's marvellous Azumi, thanks very much indeed.

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Referencing a cell to count multiple columns in another sheet

    Gldad to help and thanks for nice feedback too

+ 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. Replies: 0
    Last Post: 01-09-2013, 06:58 AM
  2. Replies: 9
    Last Post: 07-31-2012, 04:37 PM
  3. Replies: 8
    Last Post: 01-19-2012, 07:53 AM
  4. Formula referencing multiple columns
    By cbee907 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2010, 11:39 AM
  5. Referencing Multiple Columns
    By melegaunt in forum Excel General
    Replies: 3
    Last Post: 01-21-2009, 05:20 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