+ Reply to Thread
Results 1 to 12 of 12

Formula to find numbers within several ranges

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    Sunderland, UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Formula to find numbers within several ranges

    Hi,

    I'm trying to figure out a way of flagging numbers in a spreadsheet that fall between various number ranges, i'm fairly new to these kind of formula so could do with a little help

    What I have is a dump of all the external telephone calls made on our telephone system and what I want to find out is which of these calls could have been made internally between sites.

    So I have several phone number ranges i'm looking for in this dump and would like an easy way of marking them. Currently I have been importing it into an Access DB and using the "Like" function to filter out all the numbers and then having to export it back to XL to do various calculations.

    Is there a way I can do all this just within XL?

    Thanks,

    Kam

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

    Re: Formula to find numbers within several ranges

    Can you upload example workbook?

  3. #3
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Formula to find numbers within several ranges

    There undoubtedly is a way, possibly with formulas, definitely with VBA. But you'd probably need to attach a dummy spreadsheet to get a more specific answer.

  4. #4
    Registered User
    Join Date
    10-21-2011
    Location
    Sunderland, UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula to find numbers within several ranges

    Hi,

    Here is a sample sheet. the Code&Number column is the one i need to filter. So the range I would be looking to flag for example would be 111190050 to 111190099.

    Thanks,

    Kam
    Attached Files Attached Files

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Formula to find numbers within several ranges

    How output should look?

  6. #6
    Registered User
    Join Date
    10-21-2011
    Location
    Sunderland, UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula to find numbers within several ranges

    To be honest I dont really mind, might be easier if it put a true/false in the next column maybe?
    I've tried with the IF statement but could not figure out how to ignore the country code at the begining or do the full range.

    Thanks,

    Kam

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Formula to find numbers within several ranges

    Something like this? (based on 9 digit numbers)
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    10-21-2011
    Location
    Sunderland, UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula to find numbers within several ranges

    Hi zbor,

    Thats exatly the kind of thing i'm looking for

    How would I now add in other ranges of numbers? I have another 16 number ranges to filter on

    Many thanks for your help.

    Kam

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Formula to find numbers within several ranges

    Then you need slightly different approach...
    I add new sheet Ranges where you can add or remove ranges...

    Result will be number of ranges where number fall in...
    If you prefere TRUE/FALSE output put at the end >0
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Formula to find numbers within several ranges

    See attached for aternative route, although it must be noted that the ranges in L:M must be kept in numerical order (lowest to highest).
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    10-21-2011
    Location
    Sunderland, UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Formula to find numbers within several ranges

    Thank you both,so much you are both genius

    This will save me a great deal of heartache and time.

    Thanks again.

    Kam

  12. #12
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Formula to find numbers within several ranges

    @brokenbiscuits: good approach..

    Only note that for TRUE/FALSE result you dont need IF function... I.e. this will work too:

    =VALUE(RIGHT(F2;9))<=INDEX(M:M;MATCH(VALUE(RIGHT(F2;9));L:L;1);1)

    (use , instead of ; )

+ 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