+ Reply to Thread
Results 1 to 17 of 17

(SOLVED) PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    (SOLVED) PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Hi guys, i desperately need help on this. I have a report to submit by WED! Any help is appreciated!

    Attached is the picture to give a clearer idea.

    I'm trying to to do monte carlo simulation. I have one column created (G21 to G1020) and the another column (F) is the specific value that will occur in the range (G21 to G1020). Lastly, i did a Countif function with range (G21 to G1020) and criteria is the specific value from the the column (F). Formula: =COUNTIF($G$21:$G$1020,H21)

    Please tell me what did i miss out. Really appreciate your help with this. Thank you!

    COUNTIFERROR001_zps05c2252a.jpg
    Last edited by steveyeoks; 07-02-2013 at 02:42 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Hi steveyeoks,

    Welcome to the forum

    In your description you have described about Column-F but in your formula there is no reference for Column-F


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    I'm sorry! It's column H instead of F. Thanks!

    You guys are so fast with helps.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Please refer Post #3 and post a sample workbook for our better understanding

  6. #6
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Alright, but how do I upload my workbook? Sorry, i'm new in here. Just started doing excel research. Thanks!

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    It's surprising my signature don't catch your eyes Find below the detailed instruction...

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Note: Please don't attach documents containing confidential data like (address, telephone, ID#s, etc.).

  8. #8
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Hi! I have just uploaded the file. It is under "Monte Carlo Simulation". As you can see, the column-J just show "0" value.

    Thank you so much!
    Attached Files Attached Files

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    What is your expected result for J21 cell and how you do the matches and get that result?

  10. #10
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    The column-G shows the random values (G:21 to G:1020) for stock prices, Column-H shows a range of values (H:21 to H:1020) ranging from $4 to $13.99. I want to do a normal distribution with range $4 to $13.99.

    So in order to do that, I created a Column-J to "count" how many times a specific value from a column H occurred in the randomized range column-G. For example in J21 cell, I want to count how many times "4.00" (H21) occurred in the range of random values (G:21 to G:1020). Therefore i used the formula: =COUNTIF($G$21:$G$1020,H21)

    The problem is the Column-J only shows "zero" value which is weird as I can visibly see results.

    Hope I make sense. Thank you for your help!

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    I already gone through all the things which you described it in Post #10 but still expecting the answer for my request in Post 9

    The problem is the Column-J only shows "zero" value which is weird as I can visibly see results.
    What is the cells in which you are seeing the match? still what is the expected result of J21 cell?

  12. #12
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    I'm sorry Sixthsense, as for J21 cell, result is correct. My main concern is: Take a look at H:72, the value there is 4.51. I did a countif function at cell J:72: =COUNTIF($G$21:$G$1020,H72) where i want to find out how many times "4.51" appear in the range G:21 to G:1020.

    The value should not be 0 because in G:32, "4.51" appeared once.

    How do I change the formula to mitigate this error?

    Thanks!

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Quote Originally Posted by steveyeoks View Post
    Take a look at H:72, the value there is 4.51.The value should not be 0 because in G:32, "4.51" appeared once.
    Still it's unclear to me how you are matching these two..

    H72 Cell Value
    4.51

    G32 Cell Value
    5.51

  14. #14
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    G32.png

    Sorry SixthSense, I think the value for G:32 is 4.51

  15. #15
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    hi steveyeoks. you used RAND in column B, so we are not going to be seeing the same things. format your cells in column H to show like 18 decimal places. you'll see that halfway through, it goes haywire. it has got to do with Excel using binary numbers. you can google that. so you should probably use this formula in H22:
    =ROUND(H21+0.01,2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  16. #16
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    For your additional info your file is in MANUAL CALCULATION MODE.

  17. #17
    Registered User
    Join Date
    07-02-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: PLEASE HELP!! COUNTIF function for counting specifice value only shows 0

    Brilliant! It worked! You guys are awesome.. If not for my excel problem, I would not have come across such a good excel community. Thanks everyone!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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