+ Reply to Thread
Results 1 to 6 of 6

Create a distinct list based on other criteria

  1. #1
    Registered User
    Join Date
    07-28-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Create a distinct list based on other criteria

    Hello,

    I am trying to get distinct values from another worksheet based on a type of apartment unit. I have attached a sample worksheet.

    Basically, what I do is export select apartment buildings to a template with an import worksheet. Each building could have all 1 bedroom units, 2 bedrooms units, etc or a mix of both. So it has the apartment complex name and then the averages for all of their 1 bedrooms, etc.
    Then I have a table I use to put into a word report. There is a separate worksheet for 1 bedroom units, 2 bedroom, etc.
    What I want to do is be able to have, for instance, the 1 bedroom table look at the import sheet, pick out the only the distinct apartment building names that match that have one bedroom units and list those in the table along with the corresponding 1 bedroom data. Same for the 2 bedroom sheet, etc. The 1 bedroom sheet has the data missing, the 2 bedroom sheet has a sample of what I am wanting it to look like.

    Thanks in advance for any help,
    Tom
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Create a distinct list based on other criteria

    Try this.

    In Import sheet G2, copied down...
    =B2&COUNTIF($B$2:B2,B2)
    Then for the bedroom tables, use this, copied down...
    =INDEX('Import Unit Mix Comps'!$A:$F,MATCH("2 bedroom"&ROWS($A$1:$A1),'Import Unit Mix Comps'!$G:$G,0),MATCH('2 Bed Comps'!A$2,'Import Unit Mix Comps'!$A$1:$F$1,0))
    change "2 bedroom" to "1 bedroom" and it would be great is all your headings were the same. If you dont want that, then replace the last MATCH with the relevant column number....
    =INDEX('Import Unit Mix Comps'!$A:$F,MATCH("2 bedroom"&ROWS($A$1:$A1),'Import Unit Mix Comps'!$G:$G,0),1)
    =INDEX('Import Unit Mix Comps'!$A:$F,MATCH("2 bedroom"&ROWS($A$1:$A1),'Import Unit Mix Comps'!$G:$G,0),2)
    etc
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-28-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Create a distinct list based on other criteria

    Thank you for your quick response. I think I may be confused, so here goes. I used the first two formulas and they work great for getting the distinct names that correspond to which ever unit type sheet I'm using. My next problem is getting the corresponding data for each apt complex to populate the columns to the right of the complex name. So, using the example. If I put the formula and copy down starting in A4 in sheet 2 Bed Comps, I would like, as an example, for it to put in cell A5 Heatherton Apartments, then in column C5 put the average SF of the 2 bedroom apartments from the Heatherton Apartments (from the Import Unit Mix Comps worksheet cell C5) of 1,087. And so on through G5 of the 2 Bed Comps sheet.
    I think I got confused where you had said to headings should be the same. Did the formulas you put in there afterward need to go in the corresponding columns?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Create a distinct list based on other criteria

    Yes thats exactly what it does, see the attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-28-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Create a distinct list based on other criteria

    Thanks! That worked Great!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Create a distinct list based on other criteria

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to you)

+ 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. [SOLVED] Create list based on criteria and is unique
    By joannelittell in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-13-2013, 02:33 PM
  2. Create list of cells based on multiple criteria
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2013, 01:59 PM
  3. [SOLVED] Create a list that has more than one column based on a criteria
    By limebaish in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-01-2013, 09:21 PM
  4. [SOLVED] Create a separate list based on criteria in another list.
    By dpitts21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2012, 07:09 PM
  5. Distinct count based on multiple criteria - am I on the right track?
    By thedunnyman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-26-2012, 07:36 AM

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