+ Reply to Thread
Results 1 to 12 of 12

Evaluate digits within numbers

Hybrid View

rcane Evaluate digits within numbers 11-17-2009, 03:06 PM
mohitspamz Re: Can I evaluate a digit... 11-17-2009, 03:18 PM
rcane Re: Can I evaluate a digit... 11-17-2009, 04:32 PM
martindwilson Re: Evaluate digits within... 11-17-2009, 05:25 PM
rcane Re: Evaluate digits within... 11-18-2009, 05:33 PM
shg Re: Evaluate digits within... 11-18-2009, 06:05 PM
rcane Re: Evaluate digits within... 11-18-2009, 06:10 PM
  1. #1
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Evaluate digits within numbers

    Example numbers:

    21130 & 21065


    I want to check each number if EITHER of the two conditions is true:

    1. if the third digit from the right (the hundreth place) is greater than zero;

    or

    2. if the second digit from the right (the tens place) is >=6.



    If either is true I want to add a particular number to the original number.
    My example numbers meet questions 1 & 2, respectively.

    Any help on this?

    Thanks again!

  2. #2
    Forum Contributor
    Join Date
    12-02-2008
    Location
    India
    Posts
    118

    Re: Can I evaluate a digit witin a number?

    Hey!

    Try this...
    =IF(OR((MID(B14,LEN(B14)-2,1)+0>0),(MID(B14,LEN(B14)-1,1)+0>=6)),B14+"Add the Number",FALSE)

    umm... i tried the formula on B14... u'd have to replace that, and "add the number" is where u'll have to add wherever the number is and change False to wotever u wanna do if the condition doesnt match...

    Hope this helps

    Regards
    Mohit

  3. #3
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Can I evaluate a digit witin a number?

    hey thanks. i didn't see that one coming, but looks good! now if i could find a way around VBA for doing loops....

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Evaluate digits within numbers

    perhaps
    =IF(OR(MOD(A1,100)>=60,MOD(A1,1000)>=100),A1+1000,A1)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Evaluate digits within numbers

    Cool.

    On a related note, I'm using a spreadheet app on my iphone. I need to add times, but this app doesn't include the custom [h]:mm. Therefore, any hour/minute figures whose summation is greater than 24:00 roll back to "a.m." times and not the answer I'm looking for.

    Example:

    6:50 (6 hour, 50 min)
    +
    18:00 (18 hour, 0 min)

    Should equal 24:50, but this app rolls it to 00:50, or nearly 1 a.m.

    Any workarounds out there to this?

    I can't use decimals as I need to be precise to the minute. Can time values do this? I wish the app included the format limitations in the product description.
    Last edited by rcane; 11-18-2009 at 05:36 PM.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Evaluate digits within numbers

    Format the result as [h]:mm or [hh]:mm
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Forum Contributor
    Join Date
    11-11-2004
    MS-Off Ver
    pro + 2019
    Posts
    134

    Re: Evaluate digits within numbers

    Hi there,

    As I indicated in the post, I cannot use the custom [h] settings. I'm looking for low-tech ways to add times.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Evaluate digits within numbers

    You can convert the result with sufficient decimal precision to be accurate to the minute. Or format as d:h:m. Or scale to integer minutes.

+ 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