+ Reply to Thread
Results 1 to 27 of 27

extrapolate rows based on criteria

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    extrapolate rows based on criteria

    Hi there! Wondering if this is possible from within excel:

    I have a large spreadsheet of around 7000 rows and 12 columns/headers. It is a spread of real estate/properties and each row is a different property. Each column is criteria such as "address", "bedrooms", "bath", "county", etc.

    What I would like to do is pull out/select specific rows based on criteria found such as: I want to select ONLY the properties that are in the following cities, with this many bedrooms, and this many bathrooms.

    would love any help! thanks =)

  2. #2
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Autofilter should do that for you.

  3. #3
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    hmm, sounds simple enough! let me investigate

    thank you!!

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Select Data > Filter > AutoFilter (in 2003 at least) and each column in the header row will become a list box where you can select a value.
    The sheet will then only display rows where the value in that column matched your chosen value.
    You can then filter on another column to narrow your search

  5. #5
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    wow...i love Excel!

    thank you!!

  6. #6
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: extrapolate rows based on criteria

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  7. #7
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    hey gents, one more quick question....i have a list of zip codes in excel (each row a different zip code). there are thousands of them. i could use autofilter one by one on my main sheet to show only the zip codes on the list but it would take forever. is there any clever way to enter in all of those zip codes in the autofilter?

    thanks!!

  8. #8
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Plenty of clever things can be done, but what exactly is it that you want? I'm afraid I can't make it out from your post.
    Are you talking bout a seperate sheet with zip codes in or is the a zip code in each of the property?
    Last edited by Grul; 11-16-2012 at 03:06 PM.

  9. #9
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    Sorry for being unclear!

    So I have a main sheet of properties as described above.
    Each row a new property
    Each column a new criteria about TE property, such as zip code county etc

    Additionally I have a separate spreadsheet that has a list of zip codes - each row a new zip code

    My goal is to only show the properties that match the zip codes listed that match the separate sheet

    I successfully used auto filter for the other categories such as county type of property etc
    But since there are so many zip codes it is not do easy

  10. #10
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    So the zip code in the first sheet (The property one) must also appear in
    the list of zip codes in the second sheet in order to be displayed?

    Have I got that right? If so then it just got a little more complicated.
    It can be done, and without too much trouble, but autofilter isn't
    up to the task.

    A small userform with some VBA could do the job quite easily and
    I'd be happy to draft one up for you, but you may want to upload
    both files (or sample files that have the same layout) so that I can
    write it properly.

  11. #11
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    hey there, so just to explain a bit more to help out: we have investors who wish to purchase our real estate inventory based on certain criteria. They give us their "shopping list" like: single family, 3+ bedroom,s 2+ bath, under $300k, and in the following zip codes. Then we obviously try to send them just the properties that match their requested criteria from our master list.

    I attached a spreadsheet with two relevant sheets: Zip Codes by state and Property List

    1. Zip codes are the requested zip codes from the investor

    2. the property list is our master list that is already filtered by property type (they only want single family), #of bedrooms, #of baths, and requested states. What's missing is only showing properties that match the zip code list.

    I really hope that explains it and I appreciate your help! Thank you so much.

    Note: i had to remove the address and the list price for security reasons but usually those columns would of course be filled. not sure if that changes anything
    Last edited by dreborn; 11-17-2012 at 10:13 AM.

  12. #12
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    OK - I've made a start on it but it's half past midnight here so I'm going to bed soon.
    I'll work on it again in the morning and hopefully get something back to you tomorrow.

  13. #13
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    thank you so much!

    is there anything i can do to help?

  14. #14
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    After spending a few hours messing about with arrays, listboxes and comboboxes and trying to be clever, I realised I was missing something a bit obvious
    All you need to do, is add a derived column to your spreadsheet that shows if the zip code appears in the other list (Yes or No) and then filter on that.

    I had to mess about with your sheet a little as I only have 2003, and in 2003 format the file is huge so I can't upload it.
    I Copied your list of zip codes from the pivot table to column B of Sheet2

    Basically what you need to do is this...

    In column M (after Phone) create a header row of "In Zip List" (or similar)
    In M2 enter the following formula - =IF(ISNA(VLOOKUP(F2,Sheet2!B:B,1,FALSE)),"No","Yes")
    Then fill down that formula to the rest of the rows.

    What it does, is check to see if the zip code in the current row appears anywhere in the list of zips on sheet2.
    If it finds the zip it populates the cell with a Y otherwise an N.

    All you need to do now is use autofilter and selct the Ys to get all the properties in the zipcodes your investor was interested in.

    Sorry it took so long - I really wanted to do something clever with VBA

  15. #15
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    wow! you are impressive.

    I completely get the concept but for some reason the formula is not working for me--it seems to want to pull up a browse window box.

    i think it just can't find the sheet we are looking for (the zip code list)

    currently, i have the spreadsheet with sheet 1 titled: "Zip Codes by State" on sheet 1 and sheet 2 titled: "Properties"

    how can i call the sheet 1 for the formula?

    thank you again!!

  16. #16
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Just change the formula to =IF(ISNA(VLOOKUP(F2,'Zip Codes by State'!B:B,1,FALSE)),"No","Yes")
    Don't forget the single quotes :-)

  17. #17
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    I think you did it!

    one weird quirk, using it on another spreadsheet (setup identically just different file name and different properties) and the formula returns some "blanks" in the In Zip Code/formula column. any ideas?

  18. #18
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Not off-hand, no.
    The VLOOKUP portion of the formula searches column B in 'Zip Codes by State' for the value in F2 (or F3, F4 etc) - that looks OK
    The 1 in the formula tells it to search column 1 - as we are only searching on one column (B) that looks OK too.
    The VLOOKUP is then encapsulated by the ISNA function to catch the result of the VLOOKUP.
    The VLOOKUP will return the value of the cell if it finds a match, and returns #N/A if it doesn't.
    So the ISNA function detects that return and if it is #N/A it puts "No" in the cell otherwise it puts "Yes" - that also looks OK

    The only reason I can think of for blanks is that VLOOKUP is returning something other than a value or #N/A - Not sure what it would be or why though.
    Maybe one of the Forum Gurus could point you in the right direction, my Excel experience is more in the area of VBA than the application itself so I'm as confused as you are at this point.

    You could try modifying the formula in this other spreadsheet to =VLOOKUP(F2,'Zip Codes by State'!B:B,1,FALSE) and see what it returns.
    Last edited by Grul; 11-17-2012 at 10:45 AM.

  19. #19
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    well i can't thank you enough for all the time you spent. you crushed my problem on the one sheet! must be a weird quirk...ill investigate.

    thank you again

    question: "The 1 in the formula tells it to search column 1 - as we are only searching on one column (B) that looks OK too."

    i am fast learning VLOOKUP but just to make sure I understand, the 1 refers to how many columns to look for? so if we wanted it to search say, column B and C we would change it 2 (as well as change the search range to include C)
    Last edited by dreborn; 11-17-2012 at 10:52 AM.

  20. #20
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    You're welcome.

  21. #21
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    Ok, so no idea but for some reason the fields are blank because the formula is not filling down! It skips random rows for some reason. im just doing the "double click" on the fill down area on the first cell to autofill down. why is it skipping certain rows!

    and you thought you were done with me.... =)

    Note: if i manually drag down the fill down it works perfectly

  22. #22
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Not a clue.
    After putting the formula in the top row, I just highlight it, and all the rows below where I want the formula and then press <Ctrl+D>
    I don't know anything about a "fill down area" - either it's not in 2003 or I'm just not particularly observant

  23. #23
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    hey Grul (or anybody else!), for some reason the formula is not working on a new spreadsheet. i have checked everything that i can think to check but for some reason the cell only comes back with "No" even though the zip codes match in some instances.

    i have uploaded the spreadsheet i am working on: http://min.us/lIjzFoY7qiKSP

    thank you!!

  24. #24
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    anybody? really stumped!

  25. #25
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Been really busy the last week or so and only just found the time to reply.
    Unfotunately the link you provided doesn't seem to be working for me.

  26. #26
    Registered User
    Join Date
    10-08-2010
    Location
    los angeles
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: extrapolate rows based on criteria

    sorry! here you go: http://ge.tt/9e3j3gS/v/0?c

  27. #27
    Registered User
    Join Date
    10-29-2012
    Location
    Bedfordshire, England
    MS-Off Ver
    Excel 2003
    Posts
    35

    Re: extrapolate rows based on criteria

    Well, a bit of VB code showed me that there were in fact over 500 zip codes from the zip code sheet in the property sheet.
    I tried copying the zip codes to a different sheet and looking up on that as I did in the beginning - nothing.
    I tried saving it as xls instead of xlsx (also like I did with the first sheet) - nothing again. I really have no idea why the new sheet doesn't work.
    It all seems to be exactly the same as the first sheet (that works) but it's not returning anything.....
    I'm afraid i can't think what the problem could be. Maybe someone else might have some ideas.

+ 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