Search:

Type: Posts; User: Juggler_IN; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    84

    Re: Simplify Fraction UDF Error

    Eric W; the HCF approach works well.
  2. Replies
    6
    Views
    84

    Re: Simplify Fraction UDF Error

    DanteAmor; it works :)
  3. Replies
    6
    Views
    84

    Simplify Fraction UDF Error

    I have a Simply Fraction UDF which works fine whenever the numerator is less than the denominator, but fails other wise. For example for n = 50, d = 75 it outputs 2/3 but for n = 5 , d = 4 it is...
  4. Replies
    7
    Views
    278

    Re: Modified Rank function?

    jasonb75;

    With z = False, it "still" gives 4 2 2 1 as the output instead of 4 3 3 1.
    With z = True, it gives 1 3 3 4 as the output which is desired.
  5. Replies
    7
    Views
    278

    Re: Modified Rank function?

    @jasonb75; UDF edit not working.
  6. Replies
    7
    Views
    278

    Re: Modified Rank function?

    Also, there is a typo in my original code:

    Rnk = Application.WorksheetFunction.Match(x, .ToArray, 0#) + 1
    Should be,

    Rnk = Application.WorksheetFunction.Match(x, .ToArray, 0#)
  7. Replies
    7
    Views
    278

    Re: Modified Rank function?

    Akuini; It is working for Ascending but not for Descending.
  8. Replies
    7
    Views
    278

    Modified Rank function?

    I have worked out a UDF which replicates Excel Rank() function. Now, I am trying to modify it such that instead of outputting 1 2 2 4 as the ranks for a set {2,5,5,8} it should output 1 3 3 4; and it...
  9. Replies
    2
    Views
    80

    Runtime Error 13: Type-Mismatch

    Hi,

    I have a code from Stackexchange, which is giving a runtime error 13 with 2 of the 3 supporting examples. And, I have not been able to decode why. Sub Example 3 executes but Sub Example 1 and...
  10. Replies
    6
    Views
    187

    Re: nth Composite Number UDF

    Eric W;

    This does give the output, but is failing at a higher LOC value. It gives output for C at 10000 but is failing for P at 10000. It starts to fail for C at 30000.
  11. Replies
    6
    Views
    187

    Re: nth Composite Number UDF

    This meets the first part as it does output both primes and composites. What i also need is the nth value. Say if I input n=4, then it should output 4th prime = 7 and 4th composite = 9.
  12. Replies
    6
    Views
    187

    nth Composite Number UDF

    I am looking for a UDF to compute the nth composite number (nth non-prime number) similar to the nth prime.

    for e.g.,
    1st prime number is 2. 1st composite is 4.
    10th prime number is 29. 10th...
  13. Replies
    6
    Views
    168

    Re: Custom RoundUp function Error

    This option I had :) but was looking for a custom UDF. Coudn't understand why the formula was failing in certain scenarios.

    RoundtoUp = (Fix(myNum * CDec(10# ^ myFac)) + IIf(myNum = Fix(myNum *...
  14. Replies
    6
    Views
    168

    Re: Custom RoundUp function Error

    Yes, looking for RoundUp, i tried addressing floating-point part by using CDec, yet with some numbers not getting the right answer.
  15. Replies
    6
    Views
    168

    Re: Custom RoundUp function Error

    UDF not working with other numbers. There is a mismatch wrt to Excel RoundUp.

    Say, 1.49999999999999,0 with roundup = 2. With SigDig it gives 1. I am looking a RoundUp equivalent.
  16. Replies
    6
    Views
    168

    Custom RoundUp function Error

    The following RoundtoUp code is failing in few specific cases as compared with Excel RoundUp:



    Public Function RoundtoUp( _
    ByVal myNum As Double, _
    Optional ByVal myFac As...
  17. Re: Asymmetric Rounding "Rounding-Half-Down"

    @ZVI;

    Perfect!
  18. Re: Asymmetric Rounding "Rounding-Half-Down"

    @ZVI;

    No, it doesn't work.


    <colgroup><col span="18"></colgroup><tbody>

    -2.0000
    -1.7000
    -1.5000
  19. Asymmetric Rounding "Rounding-Half-Down"

    While I have been able to code a function for Asymmetric Rounding "Rounding-Half-Up" (code attached). But, I am struggling with Asymmetric Rounding "Rounding-Half-Down" method.



    Public Function...
  20. Re: Lowest decimal place value from a range of data

    Peter_SSs,

    Ofcourse, your formulae too work great!
  21. Re: How to pass UDF with ParamArray to a Range?

    If i enter =Mini(A1:A9) I get the VALUE error.
  22. Re: Lowest decimal place value from a range of data

    Peter,

    Ofcourse! ... I didn't realize that I was using it within a formula.
  23. Re: Lowest decimal place value from a range of data

    Fluff,

    Your formulae work!
  24. How to pass UDF with ParamArray to a Range?

    I have two functions from one of the threads in MrExcel forum.



    Function Mini(ParamArray values() As Variant) As Variant
    Dim minValue, Value As Variant
    minValue = values(0)
    For Each...
  25. Re: Lowest decimal place value from a range of data

    Fluff,

    Change MAX to MIN doesn't work. I tried that.
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4