+ Reply to Thread
Results 1 to 11 of 11

need a total count of number of times a value is entered in a cell

  1. #1
    Registered User
    Join Date
    02-05-2015
    Location
    BC Canada
    MS-Off Ver
    365
    Posts
    14

    need a total count of number of times a value is entered in a cell

    I need a truck count. Every truck has a number and they are hauling multiple loads. I need a number of trucks only - not loads hauled.
    What formula function do i use for this.

    your help is greatly appreciated.

    Thank you

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: need a total count of number of times a value is entered in a cell

    Need more info. Are these truck id's entered in a column? each ID in a separate cell?

    If you want the unique truck ID's in A2:A1000 with no blank cells (very important)

    =SUMPRODUCT(1/COUNTIF(A2:A1000,A2:A1000))
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: need a total count of number of times a value is entered in a cell

    Do you literally mean that one cell contains many truck numbers - which is implied from your subject header?

    Or do you have a list of cells each containing a single truck number?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-05-2015
    Location
    BC Canada
    MS-Off Ver
    365
    Posts
    14

    Re: need a total count of number of times a value is entered in a cell

    I apologies if this reply is posted a 2nd time, I responded, and cant see the reply,

    the trucks are in a column, and each id is in a separate cell. I need excel to count every duplicate entry as 1 truck. I tried the countif formula, but cannot identify the criteria

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: need a total count of number of times a value is entered in a cell

    If your ID"s are in A2:A172

    =SUMPRODUCT(1/COUNTIF(A2:A172,A2:A172))

    You might want to use a dynamic named range if the number of rows is constantly changing.

    TRUCKID = OFFSET(A2,0,0,COUNTA($A$2:$A$100000),1)

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: need a total count of number of times a value is entered in a cell

    Didn't Chemist's formula work for you? If not maybe you have a space in there somewhere.

    If so try

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Both solutions are assuming the truck numbers are indeed regular numerics and not text.

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: need a total count of number of times a value is entered in a cell

    Actually the SUMPRODUCT solution will work with non-numeric values but, as Richard pointed out, will not work if you have any blanks

  8. #8
    Registered User
    Join Date
    02-05-2015
    Location
    BC Canada
    MS-Off Ver
    365
    Posts
    14

    Re: need a total count of number of times a value is entered in a cell

    I searched my computer and found the original template... here was the formula =SUM(IF(FREQUENCY(IF(LEN(K3:K306)>0,MATCH(K3:K306,K3:K306,0),""), IF(LEN(K3:K306)>0,MATCH(K3:K306,K3:K306,0),""))>0,1))

    Now I am getting a value error.... can any of you see what may be wrong here?

  9. #9
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: need a total count of number of times a value is entered in a cell

    Try entering it using CNTRL + SHIFT + ENTER. It is an ARRAYED formula which has to be entered that way instead of a simple ENTER.

  10. #10
    Registered User
    Join Date
    02-05-2015
    Location
    BC Canada
    MS-Off Ver
    365
    Posts
    14

    Re: need a total count of number of times a value is entered in a cell

    I tried the formula given here, and I recieved a "not enough information" error so hopefully the originally formula can be worked with

  11. #11
    Registered User
    Join Date
    02-05-2015
    Location
    BC Canada
    MS-Off Ver
    365
    Posts
    14

    Re: need a total count of number of times a value is entered in a cell

    I could cry!!!! That worked!

    Thank you thank you thank you

+ 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 # times word entered in cell based of other critera
    By hambly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-08-2015, 10:38 AM
  2. [SOLVED] Count the number of times a value appears across multiple sheets displaying a total
    By Philbe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2014, 11:31 PM
  3. [SOLVED] Formula needed to only count total cells entered and not count adjacent text entered cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-07-2013, 06:22 PM
  4. [SOLVED] How to get a total 'time in minutes' from a column that has military times entered
    By bustech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2013, 07:11 AM
  5. [SOLVED] Count the total number of times several numbers appear on each row
    By dwontheweb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-28-2012, 12:11 AM
  6. Replies: 16
    Last Post: 09-06-2010, 05:11 PM
  7. How do you count how many times a cell is entered
    By sammberg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2006, 05:40 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