+ Reply to Thread
Results 1 to 6 of 6

Count values of column if header name is ...

  1. #1
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Count values of column if header name is ...

    Hi!

    Goal is to fill in cell B2:C4
    For column "B" count all the 1's if column header is equal to name in column A.
    For Column "C" needs to be checked if a value was filled in column "I" if yes then check if in column "L" has a value, count all these values.
    I also filled in an example mannually so that can be used as check!

    Hope somebody can help me I am struggeling with this for a while
    Thanks!
    Attached Files Attached Files
    Last edited by keis386; 04-25-2014 at 10:50 AM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Count values of column if header name is ...

    =SUM($I$2:$K$12*($I$1:$K$1=$A2))
    in B2 and
    =SUM((A2=$I$1:$K$1)*I$2:K$12*L$2:L$12)
    in C2
    both array formulas (confirm with ctrl+shift+enter), then copy down.

  3. #3
    Forum Contributor
    Join Date
    01-17-2011
    Location
    amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    189

    Re: Count values of column if header name is ...

    Great thanks!! It looks so easy!

  4. #4
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Count values of column if header name is ...

    non-array option:

    B2 and down -
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    C2 and down -
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

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

    Re: Count values of column if header name is ...

    Try these...

    Entered in B2:

    =SUM(INDEX($F$2:$L$12,0,MATCH($A2,$F$1:$L$1,0)))

    Entered in C2:

    =COUNTIFS(INDEX(F$2:K$12,0,MATCH(A2,F$1:K$1,0)),"<>",L$2:L$12,"<>")

    Select B2:C2 and copy down.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Count values of column if header name is ...

    Hello

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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. Count the values in a particular column based on header name
    By cokee_33 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-20-2014, 10:41 AM
  2. Macro to identify column by header and replace number values with string values
    By kang6789 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-22-2013, 05:44 PM
  3. [SOLVED] Count cell values under column with today's date header
    By jben86 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-23-2013, 03:19 PM
  4. Count Row values based on Column header
    By sramakrishna in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-06-2013, 09:07 AM
  5. Count if values based on column header
    By vijanand1279 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2012, 03:17 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