+ Reply to Thread
Results 1 to 6 of 6

UDF to represent middle numbers....

  1. #1
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Smile UDF to represent middle numbers....

    Hi all
    i''ve got a question
    How can I represent number between two numbers. For example. When you enter {=SUM(ROW(1:10))} ROW functions returns an array representing numbers between 1 and 10 ({1,2,3,4,5,6,7,8,910}).

    Basically I need represent by the same way numbers beteween two times. For example. In A1 I have 05:13 and in B1 I have 09:35. When I convert A1 value them to the decimal I get 0.216666666666667 and for B1 value I get 0.399305555555556.
    So, in short, i need function that would represent "Middle numbers" like {0.216666666666667, 0.216666666666668, 0.216666666666669....0.399305555555556}

    I need it in my calculations....

    Thanks for all for your help....

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: UDF to represent middle numbers....

    Do you really need to go to that level of significance ?

    Bear in mind 1 second in XL equates to: 0.000011574074074

    Whereas you're looking to Sum the values between two times in increments of 0.000000000000001

    What is you're doing exactly ?

  3. #3
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: UDF to represent middle numbers....

    Hi DonkeyOte and thank you for quick responce
    Actually I would compare them.
    I really need this kind of function. I have even wrote one but it's not working

    Please Login or Register  to view this content.
    I thought this macro would create an array by addind 0.000000000000001 to ecah value between Time start and TimeEnd....

    Do you really need to go to that level of significance
    Yes, I would like so, and just intersted in creating this kind of formula

  4. #4
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717

    Re: UDF to represent middle numbers....

    Well the number of loops required is tooooooooo much... and i don't think you can accumulate million+ words in the same cell

    Try using JAVA (java.math.BigDecimal) it may give u the desired result ...
    Last edited by Shijesh Kumar; 01-23-2010 at 10:03 AM.

  5. #5
    Registered User
    Join Date
    09-17-2009
    Location
    Russia, St. Petersburgh
    MS-Off Ver
    Excel 2003/2007
    Posts
    62

    Re: UDF to represent middle numbers....

    Yes, I actually understand that it's wron approach.

    It's OK If it is not possible.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: UDF to represent middle numbers....

    Using your sample times of 05:12 and 09:35... divided by 0.000000000000001 is 182,638,888,888,889 ... I'm not sure XL will like that too much

    Perhaps a SUM of series approach might work - I don't know to be honest - I'm not a mathematician !

+ 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