+ Reply to Thread
Results 1 to 2 of 2

Count number of occurences in excel

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2014
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    1

    Count number of occurences in excel

    Hi all,

    In a datafile i have one column containing a trip 'origin' and a second column contains 'destinations'. I want to count how many times each trip occurs (so the same origin/destination pair). This is doable using COUNTIFS but unfortunately respondents did not provide consequent origins and destinations. I encountered the following formulations
    -Alfastraat, Amsterdam
    -Alfastraat 5, Amsterdam
    -Alfastraat 5, 1021AB Amsterdam
    -Amsterdam, Alfastraat

    Since the format is different among and within respondents functions containing LEFT, RIGHT, MID are not useful (at least, my trials did fail). I found a VBA-script for a FUZZYVLOOKUP which sounded promising. Unfortunately the data is stored on a remote PC without VBA on it.
    Is there a way to count the occurrences of trips given the circumstances?

    Regards,
    Chris

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,716

    Re: Count number of occurences in excel

    How about:

    =(COUNTIFS(G3:G6,"*Alfastraat*",H3:H6,"*Amsterdam*")+COUNTIFS(H3:H6,"*Alfastraat*",G3:G6,"*Amsterdam*"))

    The names could be replaced with cell references, of course.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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 number of occurences per month per day Excel 2010
    By captike in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-07-2014, 12:45 AM
  2. [SOLVED] count number of occurences per date per 30 minute block in excel 2003
    By Marlaine in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-08-2013, 08:04 PM
  3. count the number of duplicates and print the number of occurences
    By ash81sen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-12-2010, 01:21 PM
  4. Count the number of occurences of a value
    By therealjag in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2010, 06:25 AM
  5. Count number of occurences in a range
    By akabraha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2007, 12:55 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