+ Reply to Thread
Results 1 to 13 of 13

Counta of a column G if column B = matching text

  1. #1
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Counta of a column G if column B = matching text

    I need to obtain a COUNTA of column G if column B = matching text

    B G

    GSM 20
    HAA 10
    GSM 10
    HAA 20

    I need a cell for GSM to = 2

    I do not need to sum column G just count the instances.
    I have tried COUNTIFS but it is coming up with too few calculations

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,941

    Re: Counta of a column G if column B = matching text

    The solution *is* COUNTIF or COUNTIFS. If you're not getting the answer you expect, check the data (F2 to edit the cells) and see if there are any trailing spaces.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    11-26-2011
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    159

    Re: Counta of a column G if column B = matching text

    HI,

    why didnt you try for Countif function ???

    =countif(range,"Criteria")
    eg. countif(A1:B4,"Gsm")

  4. #4
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Counta of a column G if column B = matching text

    Thanks
    I have tried =COUNTIF($G$20:$G$73:$B$20:$B$73,"GSM") but it is counting column B. I want it to count column G if column B contains GSM
    Not sure what I am doing wrong have tried lots of variations like =COUNTIFS($G$20:$G$73,$B$20:$B$73,"GSM") but none working.

    Any ideas would be GREATLY appreciated :-)

  5. #5
    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: Counta of a column G if column B = matching text

    Hi

    As you are in Excel 2003, try this.

    =SUMPRODUCT((B20:B73="GSM")*(G20:G73))

    Is it OK for you?
    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.

  6. #6
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Counta of a column G if column B = matching text

    Thanks Fotis

    Nearly there :-) it is adding the monetary amounts together in the column, I need it to count just the number of times it appears.
    Have tried counta but not working.

    Regards
    Aisling

  7. #7
    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: Counta of a column G if column B = matching text

    =COUNTIF(B20:B75,"GSM")

    If this is not, also, works for you, pls, upload a small sample workbook.

  8. #8
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Counta of a column G if column B = matching text

    I am trying to get highlighted column L to count the number of cells with information by column B information.
    Column M is working fine so I just need a similar formula to count rather than add the information.

    Sample file.xlsx

  9. #9
    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: Counta of a column G if column B = matching text

    In L3>>>=COUNTIF($B$20:$B$75,"GSM")

    In L4>>>=COUNTIF($B$20:$B$75,"HAA")

    ..And so on.....

  10. #10
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Counta of a column G if column B = matching text

    Hi Fotis

    Thank you for the above but this counts column B I need it to count column G when it gets paid back.

    Thanks

  11. #11
    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: Counta of a column G if column B = matching text

    Another suggestion..

    L3>>=SUMPRODUCT(($B$20:$B$75="GSM")*($G$20:$G$75<>""))

    L4>> =SUMPRODUCT(($B$20:$B$75="HAA")*($G$20:$G$75<>""))

  12. #12
    Registered User
    Join Date
    02-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: Counta of a column G if column B = matching text

    Perfect
    Thank you so much Fotis

    Regards
    Aisling

  13. #13
    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: Counta of a column G if column B = matching text

    You are welcome!

    Target was to understant what you want. When i did....

    Pls. mark your Thread, as Solved.

+ Reply to Thread

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