+ Reply to Thread
Results 1 to 7 of 7

Counting a cell based on the content of adjoining cell

  1. #1
    Registered User
    Join Date
    05-22-2005
    Posts
    38

    Counting a cell based on the content of adjoining cell

    Hey,

    I am trying to count some numbers from colum (h) but only the ones that have the phrase 'text' in the cell directly next to it ( colum G).
    any help would be great.

    Thanks

    James

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =Sumif(G:G,"Text",H:H)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-22-2005
    Posts
    38
    thanks for that, but I think I may have misrepresented my question.
    I want each occasion then the word text is in for example G2, the contents of H2 to be replicated I2.

    How's this best done?

    Thanks again

    James

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Type the below formula in I2.
    It will replicate the content of H2 in I2 if G2 is "Text"


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-22-2005
    Posts
    38
    This seems to recognise that then 'text' is in the cell that it should do something but leaves the cell containing " " - Nothing rather then a replication of the data in cell H.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Is it just the word "text" that would be contained in G2 or is "text" a substring of what's in G2?

    if so, try

    =if(Isnumber(search("Text",G2)),H2,"")

  7. #7
    Registered User
    Join Date
    05-22-2005
    Posts
    38
    That works an absolute treat,

    Thanks for all your help guys!

    James

+ 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