+ Reply to Thread
Results 1 to 12 of 12

Return a value if a number is in a range, even, and then matches the street

  1. #1
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Unhappy Return a value if a number is in a range, even, and then matches the street

    Hi guys,

    I've searched for an answer, but cant find quite what I'm looking for.

    Basically, I have a huge list of addresses with ID numbers, and a list without the ID numbers. An example would be;

    2-10 (evens), test road, ID123.

    I need to identify if the address is on the street, is in that block of flats (i.e between 2-10, and even number), and then return the ID.

    I've already split the number between two cells, but then its all gone a bit wrong.

    What would be the easiest way to go about this?

    Thank you for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Return a value if a number is in a range, even, and then matches the street

    Pixelninja, Good afternoon.

    Probably you can use a Find function or some text functions.
    Please, attach an example of your file here and put manually what will be the desired result.

    To attach file, please, enter thru the advanced option at editor menu.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  3. #3
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Return a value if a number is in a range, even, and then matches the street

    Ok, I've attached an example now

    I hope I can get this to work.
    Attached Files Attached Files

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Return a value if a number is in a range, even, and then matches the street

    Try this array formula in B2

    =IFERROR(INDEX(Source!B$2:B$4,SMALL(IF(--LEFT(Source!$A$2:$A$4,FIND("-",Source!$A$2:$A$4)-1)<10,ROW(Source!$A$2:$A$4)-1),ROWS($A$1:A1))),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Return a value if a number is in a range, even, and then matches the street

    Thanks for your response.

    Its returning the Street name, as opposed to the ID.

    Other than that it seems to be working perfectly.

    I'll have a property, for instance, 3 Test Road, but no ID number. In another sheet, I'll have a list of blocks of flats with a relevant ID. I.e block of flats 1-9 (odds) will obviously have 1,3,5,7,9. All of these flats will share the same ID. I then need to assign that ID to 3 Test Road.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Return a value if a number is in a range, even, and then matches the street

    After you enter in B2 and Ctrl+Shift+Enter, drag it to the right and down. You'll get the street and ID

  7. #7
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Return a value if a number is in a range, even, and then matches the street

    Column B already has the street name? I'm going to lose the street name if I enter it there?

    I've entered it as an array formula too, I'm getting the {}, but its returning "Test Road" on all of the rows?

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Return a value if a number is in a range, even, and then matches the street

    Please see attached file
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Return a value if a number is in a range, even, and then matches the street

    You're a real life super hero.

    I assume you wear your briefs on the outside of your pants?

    Thank you!

  10. #10
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Return a value if a number is in a range, even, and then matches the street

    You're welcome and thank you for the feedback!

  11. #11
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Return a value if a number is in a range, even, and then matches the street

    Hi
    I used helper columns otherwise formula will be long
    =IFERROR(INDEX(Source!C$2:C$4,SMALL(IF(--LEFT(Source!$A$2:$A$4,FIND("-",Source!$A$2:$A$4)-1)<10,ROW(Source!$A$2:$A$4)-1),ROWS($A$1:B1))),"")

    See attached file. Hope this is what you want
    Appreciate the help? CLICK *

  12. #12
    Registered User
    Join Date
    03-16-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    7

    Re: Return a value if a number is in a range, even, and then matches the street

    Thanks AZ-XL, the only thing your formula didnt do, was take into account the street name..

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 01-05-2013, 01:28 AM
  2. [SOLVED] Trying to separate street number and street name into columns
    By greenmat in forum Excel General
    Replies: 7
    Last Post: 07-27-2012, 04:24 PM
  3. separate street address and street number
    By iwanttoplaywii in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-24-2011, 09:45 PM
  4. VLOOKUP - Return sum of all matches in Range?
    By Wiggz in forum Excel General
    Replies: 3
    Last Post: 01-25-2007, 06:42 AM
  5. [SOLVED] How do I sort a column of street number/street name by the stree.
    By JHoleman1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-07-2005, 09:06 PM

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