+ Reply to Thread
Results 1 to 3 of 3

Counting number of similar entries

  1. #1
    Registered User
    Join Date
    03-08-2013
    Location
    Nashville, TN
    MS-Off Ver
    Excel 2010
    Posts
    5

    Counting number of similar entries

    Here's what I'm trying to do. I have a spreadsheet which contains the serial numbers, asset IDs, and other information for the radios we have in our inventory. I currently use this sheet to populate other sheets automatically when a serial number is entered. This sheet contains multiple models of radios and I'm looking for a way to count how many of each radio we have without having to do it manually. The format for these serial numbers is 123ABC4567. The first 3 numbers are the same for each specific model of radio. For example, if I see a serial number of 205CDY3245, I know it is a XTS2500 portable but if the number is 527CMM4838, I know it is an APX6500 mobile. There are around 20 different models that we have.

    Basically, I want to have a formula that tells me I have x number of XTS2500s, x number of APX6500s, etc.... I know I can do this by creating a column for each model type and putting a 1 in for that specific model, but that is time consuming and a mistake could easily be made. I don't know enough about formulas to figure out how to look at just the first 3 digits of the serial number and count those that match what I'm looking for. (i.e. looking for XTS2500s that start with 205XXX#### and count just those.)

    Any help would be greatly appreciated. Thanks in advance.

    Wayne

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

    Re: Counting number of similar entries

    Maybe something like this...

    Data Range
    A
    B
    C
    D
    1
    Model
    ------
    Model
    Count
    2
    123xx456
    123
    2
    3
    255fg333
    4
    123oo789
    5
    321re220


    This formula entered in D2:

    =COUNTIF(A2:A5,C2&"*")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Valued Forum Contributor
    Join Date
    01-08-2011
    Location
    Portsmouth, England
    MS-Off Ver
    Excel 2007 to 2016
    Posts
    456

    Re: Counting number of similar entries

    You could try using the MID formula to get the first 3 digits

    =MID(A1,1,3)

    Then you can use VLOOKUP to get the model name from a list range and store this in a new column. Once it's stored, you can use this in COUNTIF formulas or pivot tables.

    So if your model name range was "Models", with the 3 digit code in the first column and the model name in the second, it might look something like:

    =VLOOKUP(MID(A1,1,3),Models,2,false)

    If the 3 digit code in the first column is always a number, you will need to convert the MID result to a value so it would look like:

    =VLOOKUP(VALUE(MID(A1,1,3)),Models,2,false)

    Hope that helps
    Shirley

+ 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. [SOLVED] Counting the number of entries in a column (but only once for consecutive entries)
    By 11416498 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-30-2014, 09:36 AM
  2. counting number of entries
    By onthecauseway in forum Excel General
    Replies: 1
    Last Post: 09-01-2011, 10:06 AM
  3. VBA for limiting number of similar entries with a pop up box
    By ramakavin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2008, 12:33 AM
  4. counting the number of entries
    By Dan Mackman in forum Excel General
    Replies: 1
    Last Post: 11-10-2008, 10:42 AM
  5. Counting number of row entries
    By BobD in forum Excel General
    Replies: 1
    Last Post: 06-21-2006, 04:15 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