+ Reply to Thread
Results 1 to 12 of 12

Count the number of typing specific number in a cell

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Count the number of typing specific number in a cell

    Hello everybody
    I have this code that I need to fix .. I want to type numbers in range("A1") and in range("B1") to represent counter for each entry

    Say I entered 15 in A1 >> B1 would be 1
    Entered 20 in A1 >> B1 would be 1
    Entered 15 in A1 >> B1 would be 2
    Entered 30 in A1 >> B1 would be 1
    Entered 15 in A1 >> B1 would be 3
    Entered 20 in A1 >> B1 would be 2
    And so on..

    I tried this code to store my entries as an array and from the array to count specific items
    Please Login or Register  to view this content.
    But I can't fix it as my knowledge of arrays is so weak
    Thanks advanced for help

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,043

    Re: Count the number of typing specific number in a cell

    Store typed values in other sheet and just use COUNTIF in first sheet.
    Never use Merged Cells in Excel

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Count the number of typing specific number in a cell

    Thanks Mr. zbor for this great idea ..
    But I need to learn how to use arrays to store values entered in range("A1") and how to restore the count of specific value withing this array
    Thanks advanced

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Count the number of typing specific number in a cell

    YasserKhalil,
    Are open to use "Scripting.Dictionary" ?
    PCI
    - Battle without fear gives no glory - Just try

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Count the number of typing specific number in a cell

    Thanks Mr. PCI
    Can you help me doing that ..Using "Scripting.Dictionary"?

  6. #6
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Count the number of typing specific number in a cell

    Put in worksheet area of your code (so not in a module).

    Please Login or Register  to view this content.
    This seems to do exactly what you ask for

    Please click the * below if this helps
    Last edited by JasperD; 04-06-2015 at 04:25 PM.
    Please click the * below if this helps

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Count the number of typing specific number in a cell

    Thanks Mr. JasperD for this wonderful code
    Try enter 1 and 11 and 1 again .. See the results

  8. #8
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Count the number of typing specific number in a cell

    Bad attitude to people who try to help you is never appreciated...
    Solution to it is rather simple though.

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Count the number of typing specific number in a cell

    See how next code is working
    in the worksheet code
    Please Login or Register  to view this content.
    in a module

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by PCI; 04-06-2015 at 04:55 PM.

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Count the number of typing specific number in a cell

    Thanks a lot Mr. JasperD for this magic code
    And I appreciate your help of course .. I just put my remarks at first and I won't forget to appreciate you..
    Thanks a gain for your great help.

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Count the number of typing specific number in a cell

    Mr. PCI
    I didn't reply on your post till test it
    Really wonderful and works like a charm
    Thanks a lot for your help
    Thank you for these wonderful solutions

  12. #12
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: Count the number of typing specific number in a cell

    YasserKhlil,
    Because you were mentioning the use of array see here a remake with array, just for the fun.
    Please Login or Register  to view this content.

+ 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] Count number of times a specific number is displayed in a cell ran
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 12:05 PM
  2. Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  4. Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2005, 01:05 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