+ Reply to Thread
Results 1 to 7 of 7

count the amount of time certain text occurs but ignore dulpicates in a row

  1. #1
    Registered User
    Join Date
    10-14-2017
    Location
    london, england
    MS-Off Ver
    office professional plus 2016
    Posts
    3

    count the amount of time certain text occurs but ignore dulpicates in a row

    Hi,
    im in need for a formula that will count the amount of times a word appears in a selection of columns but if the word is duplicated in a row I only need it to count it once.
    The columns are part of a larger spreadsheet and the rows in question are GG:IA

    If i was to use countif formula =COUNTIF('Company Data'!GG:IA,"cars") it counts every time the word cars appears but if cars appears in say GG6, GH6 and HI6 I only want it to be counted once. If Cars appears in GG7 though I still want this to be counted, but only once if cars appears again in row 7

    So I want duplicates only not to be counted if they are duplicated in a row.

    The source data columns will not change per month as they are set but the rows will increase the more companies are added.
    Hope this makes sense.

    Thanks

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: count the amount of time certain text occurs but ignore dulpicates in a row

    could you spare a non sensitive sample in excel?

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: count the amount of time certain text occurs but ignore dulpicates in a row

    Try this ARRAY formula

    =SUM(--(COUNTIF(OFFSET('Company Data'!$GG$1:$IA$1,ROW($1:$10)-ROW($1:$1),0),"cars")>0))

    This formula covers row 1 to 10. If required it can be changed.

    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    formula will be covered with{} brackets by excel.
    Last edited by kvsrinivasamurthy; 10-15-2017 at 01:14 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  4. #4
    Registered User
    Join Date
    10-14-2017
    Location
    london, england
    MS-Off Ver
    office professional plus 2016
    Posts
    3

    Re: count the amount of time certain text occurs but ignore dulpicates in a row

    kvsrinivasamurthy,
    That is totally amazing!!
    I ave adjusted the forumla so that is works with the correct woorksheet:

    =SUM(--(COUNTIF(OFFSET('Company Data'!$GG$1:$IA$1,ROW($1:$1012)-ROW($1:$1),0),"cars")>0))

    I take it i will have to keep adjusting the rows as required? currently at 1012?

    Thanks

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: count the amount of time certain text occurs but ignore dulpicates in a row

    Welcome. Thanks for the feed back.
    If rows keep changing it is not necessary to change row numbers chnging. Pl upload file and show that how rows changing. Formula can be suitably changed.
    Last edited by kvsrinivasamurthy; 10-15-2017 at 08:48 AM.

  6. #6
    Registered User
    Join Date
    10-14-2017
    Location
    london, england
    MS-Off Ver
    office professional plus 2016
    Posts
    3
    I havent access right now but when I update next month the rows will increase as new companies will be added so if i have say 1007 rows now it might go up to 1020 rows next month. If im being honest you have done the hard work so if I have to manually update the number of rows its no big deal really.

    Thanks

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: count the amount of time certain text occurs but ignore dulpicates in a row

    Thanks for information. Good day.

+ 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. Only want to count a text string if it occurs within and entire row
    By 2clicks in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-06-2015, 10:05 AM
  2. Replies: 4
    Last Post: 11-06-2014, 02:34 AM
  3. [SOLVED] Date When Certain Amount of Text Occurs
    By jhudson444 in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 12-05-2013, 09:43 PM
  4. [SOLVED] Count how many times a word occurs in a cell containing text
    By frisbie17 in forum Excel General
    Replies: 2
    Last Post: 08-01-2012, 02:31 PM
  5. [SOLVED] Count times a text string occurs
    By mistert in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2012, 09:54 PM
  6. Count X amount of numbers between #1 occurs
    By slk704 in forum Excel General
    Replies: 5
    Last Post: 11-08-2010, 07:24 AM
  7. Can a calculation ignore text if it occurs in formula's cell range
    By Sally in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2005, 12:50 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