+ Reply to Thread
Results 1 to 26 of 26

Data Validation List / Sort Problem?

  1. #1
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Data Validation List / Sort Problem?

    I am using the following formula to sort data from sheet1(data) to be used on sheet3(adjustments) with a data validation list.

    Cell A2 is my Property address
    =IF(ROW(A1)<=ROWS(OFFSET('Data '!$A$1,1,0,COUNTA('Data '!$A:$A)-1,1)),INDEX(OFFSET('Data '!$A$1,1,0,COUNTA('Data '!$A:$A)-1,1),MOD(SMALL(CODE(LEFT(OFFSET('Data '!$N$1,1,0,COUNTA('Data '!$N:$N)-1,1),1))+(ROW(OFFSET('Data '!$A$1,1,0,COUNTA('Data '!$A:$A)-1,1))-1)/1000,ROW(A1)),1)*1000,),"")

    Cell A3 Status of each property, Active, Sold, Closed etc...
    =IF(ROW(B1)<=ROWS(OFFSET('Data '!$N$1,1,0,COUNTA('Data '!$N:$N)-1,1)),INDEX(OFFSET('Data '!$N$1,1,0,COUNTA('Data '!$N:$N)-1,1),MOD(SMALL(CODE(LEFT(OFFSET('Data '!$N$1,1,0,COUNTA('Data '!$N:$N)-1,1),1))+(ROW(OFFSET('Data '!$N$1,1,0,COUNTA('Data '!$N:$N)-1,1))-1)/1000,ROW(B1)),1)*1000,),"")

    This is working really well thanks to help from this forum, however I ran into a bug while using the spreadhseet. I had a property that had been both sold and active.

    When I go to sheet3(adjustments) and used the data validation list to select the property its only allowing the property from one status and the rest of spreadsheet is using data of that property form another status in other words:

    When I go to sheet3(adjustments) I should be able to select the status of property I want to use then the next cell allows me to pick amongst those propertys that meet the status criteria and then the rest of the spreadhseet uses the following formula =VLOOKUP($D$2,vlookuptable,30,0)
    to input data and make calculations.

    The problem in simple english is 12 apple street is in my data twice once as a "sold" status property and once as an "active" status property, both are correct the home was sold a few months ago and is now for sale again("Active")
    The problem is I am selecting status "sold" and 12 apple street populates but in the look up formulas it is giving the information for 12 apple street that has an status of "active"

    If anyone had any ideas I would really appreciate the feedback .I need 12 apple street to show as both "sold" and "active " status and depending on my selection from my data validation list the look up formula should reference the correct data.

    Thanks

    p.s i am not entirely comfortable with how the sort formulas are working a bit over my head. I got them from someone on this forum
    Last edited by Billyboy; 08-20-2009 at 06:08 PM.

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

    Re: Data Validation List / Sort Problem?

    workbook please with examples!
    "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

  3. #3
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Here you go
    Attached Files Attached Files

  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: Data Validation List / Sort Problem?

    well you seem to have deleted all your data from sheet data so named ranges are blank
    so i have no idea what's supposed to be happening.
    make up a workbook with right ,wrong,duplicate or whatever

  5. #5
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    here you go
    Attached Files Attached Files

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

    Re: Data Validation List / Sort Problem?

    fyi altho' 0=false in excel ,use =VLOOKUP($D$2,vlookuptable,30,false)
    it makes it clearer to see whats actually being done at a glance
    and
    oh well here we go
    you have no sheet 3 called "adjustments"
    I should be able to select the status of property I want to use
    how/where?
    but a vlookup will only find the first "sold" so you need to make that something else now thats a harder thing!
    and i cant see from your sheet what you mean
    make upa sheeet with say 20 rows illustrating your problem.
    Last edited by martindwilson; 08-20-2009 at 07:27 PM.

  7. #7
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by martindwilson View Post
    fyi altho' 0=false in excel ,use =VLOOKUP($D$2,vlookuptable,30,false)
    it makes it clearer to see whats actually being done at a glance
    and
    oh well here we go
    you have no sheet 3 called "adjustments

    how/where?
    Sheet3 is called "Adjustments Tempo"
    There is a data validation list in cel d1 which lets me select the status of the propertys i want to choose from d2 then also has a data validation list that will give me the address of the propertys that match the status in D1

  8. #8
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by martindwilson View Post
    fyi altho' 0=false in excel ,use =VLOOKUP($D$2,vlookuptable,30,false)
    it makes it clearer to see whats actually being done at a glance
    and
    oh well here we go
    you have no sheet 3 called "adjustments"

    how/where?
    but a vlookup will only find the first "sold" so you need to make that something else now thats a harder thing!
    and i cant see from your sheet what you mean
    make upa sheeet with say 20 rows illustrating your problem.
    On Sheet "Data" row 84 and 123 are the same property
    go to the adjustment tempo page and you can see what i am talking about

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

    Re: Data Validation List / Sort Problem?

    yep i can see that, it may be perfectly obvious to you but what /where is looking up that info ?
    what formula in what cell says get info from data! row 84/85

  10. #10
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by martindwilson View Post
    yep i can see that, it may be perfectly obvious to you but what /where is looking up that info ?
    what formula in what cell says get info from data! row 84/85
    I think the "sort sheet is hidden you should be able to unhide it that is what sorts the data so the data validation list can be used

    On the Adjustments Tempo sheet the user selects the data validation drop list (D2) and selects the status of propertys they wish to choose from then they select the property to use (D3)
    D4 and down to D25 use the vlookup formula to pull over the data for the corresponding property selcted in D2

    In the workbook i sent you the selcted property happens to be the one that has both a "sold" status and "Pending" status,
    The problem is that it comes across the data validation drop list as a "pending" but it pulls the data from the "sold" list on the data sheet. because as you said vlookup stops as soon as it finds the property.
    Last edited by Billyboy; 08-20-2009 at 08:29 PM.

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

    Re: Data Validation List / Sort Problem?

    i sort of see but its too much reverse engineering for me to see how this was all put together.do you know who originally helped you out? they may see somthing i'm clearly missing,sorry!

    ANYONE ELSE HERE HELP?

  12. #12
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by martindwilson View Post
    i sort of see but its too much reverse engineering for me to see how this was all put together.do you know who originally helped you out? they may see somthing i'm clearly missing,sorry!

    ANYONE ELSE HERE HELP?
    I did it all myself with the exception of the formula to sort the data by status
    If you dont sort the data, then the data validation lists dont work or are not accurate.

    If you look at cell d2 that is a list of "status'" if i select "Active for example, then the data validation list in cell D# is restricted to propertys who match the "active" status the D3 on down use vlookup to pull the data for that property, All works fine,

    Except when you have the same property that has 2 different "status" such as in my work book the property at row 83 and row 132 on the data sheet are the same 19701 Hatton, it has 2 different status in this case "pending" and "sold"
    The problem is that when you have 2 of the same propertys the data validation grabs the information for the first instance of that data, so i either need another way of doing it or a modification to vlookup

  13. #13
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    Working backwards....

    If we take Sheet DATA I would do the following:

    Please Login or Register  to view this content.
    This simple approaches gives you a nice quick way to identify various properties without the need for expensive arrays later on...

    Insert new sheet - let's call it "DNR"... on DNR sheet:

    Please Login or Register  to view this content.
    Now let's create new Named Ranges

    Please Login or Register  to view this content.
    Now on to "Adjustment Tempo" sheet ... revise the Validation sources as follows:

    Please Login or Register  to view this content.
    So as D1 is altered so D2 listing updates... re: your issue with Status, why not simply tie to D1 ?

    Please Login or Register  to view this content.
    You know if the property is selected in theory it should be the same as D1, no ?

    Does that help ?

  14. #14
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    ... and having just re-read it would appear the issue is not related to the Validation at all ... that said I would still advocate the above over the existing as I think it's far simpler and importantly the addition of KEY column to Data sheet is what will resolve your fundamental issues...

    So continuing from above... on Adjustment Tempo sheet:

    Please Login or Register  to view this content.
    The above will return the Unique Key value for chosen property... use this as basis for retrieving all other info as it is a unique value on Data sheet... col AF, eg - let's select "Pending Sale" in D1 and subsequently "19701 Hatton St" as our property given we know 2 records exist...

    Using the original MLS# formula:

    Please Login or Register  to view this content.
    we know returns the number for the Closed Sale instance irrespective of choice in D1 (ie not the Pending Sale value) ... using our unique value as stored in E1

    Please Login or Register  to view this content.
    returns the correct value... the same logic is applied elsewhere...

    NOTE: the MATCH of E1 is a repetitive calculation, that is to say the value will be used repeatedly without result altering so rather than recalculating the same value over and over I would advise storing the result of the MATCH in another cell and then referring to said cell in all other calcs (ie calculate only once).

  15. #15
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by DonkeyOte View Post
    ... and having just re-read it would appear the issue is not related to the Validation at all ... that said I would still advocate the above over the existing as I think it's far simpler and importantly the addition of KEY column to Data sheet is what will resolve your fundamental issues...

    So continuing from above... on Adjustment Tempo sheet:

    Please Login or Register  to view this content.
    The above will return the Unique Key value for chosen property... use this as basis for retrieving all other info as it is a unique value on Data sheet... col AF, eg - let's select "Pending Sale" in D1 and subsequently "19701 Hatton St" as our property given we know 2 records exist...

    Using the original MLS# formula:

    Please Login or Register  to view this content.
    we know returns the number for the Closed Sale instance irrespective of choice in D1 (ie not the Pending Sale value) ... using our unique value as stored in E1

    Please Login or Register  to view this content.
    returns the correct value... the same logic is applied elsewhere...

    NOTE: the MATCH of E1 is a repetitive calculation, that is to say the value will be used repeatedly without result altering so rather than recalculating the same value over and over I would advise storing the result of the MATCH in another cell and then referring to said cell in all other calcs (ie calculate only once).
    Thanks so much for the lenghty research and help, were would the code be placed?

  16. #16
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    ok I think i got most of it, When i revise the data validation list on adjustment page i get an error message that i can reference other worsksheets or workbooks
    I am slo a little confused about the E1 storing? the key formula works and i added the DNR sheet and that seems to be working, although i am not quite sure about the name ranges i am doubling checking
    Last edited by Billyboy; 08-21-2009 at 11:30 PM.

  17. #17
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    Billboy, see the attached work-up in which all is in place... though note I have only entered the formula into D3 on Adjustment Tempo sheet... the others all need to be altered in the same manner (ie utilising value in E1 and column AF on Data sheet)
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    Thank you, looks like its working I will replace all the other formulas and test it out
    Do you know how to cut and paste a formula from the validation list box?

  19. #19
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    You can copy the cell and paste special Validation only to the other cells... I can't recall off-hand how we set up the cell references in the existing Validation cell but if not absolute they should alter appropriately (just check each cell once you've pasted the validation rules).

  20. #20
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    I cant thank you enough, this is a better way of doing what I needed done, compared to an array formula.
    I see on the data sheet you added drop down lists to sort the data. I am a bit embarrased but how was those created and if i cut paste new data into that shet will those lists be deleted.

    The way the sheet works now is the users pastes the data into that sheet from another sheet.

    Maybe there is a better way by referencing the sheet that has the data

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

    Re: Data Validation List / Sort Problem?

    donkeyote has just been awarded mpoas!

  22. #22
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    Quote Originally Posted by Billyboy View Post
    I cant thank you enough, this is a better way of doing what I needed done, compared to an array formula.
    I see on the data sheet you added drop down lists to sort the data. I am a bit embarrased but how was those created and if i cut paste new data into that shet will those lists be deleted.

    The way the sheet works now is the users pastes the data into that sheet from another sheet.

    Maybe there is a better way by referencing the sheet that has the data
    The dropdowns on Data are the result of applying an Auto Filter against the data set, see: http://www.contextures.com/xlautofilter01.html

    To be honest I added them only so I could quickly filter the records discussed (those in yellow) so I could quickly check to see if the revised formulae etc were working correctly.

    Regards collating the datasheet itself, we might be able to help on that front but we would need more info with regard to where the data is presently stored etc ie from where it is copied and whether or not there is any underlying that dictates when the data is copied.

    Martin, mpoas ? I don't know that acronym - I hope it's not offensive

  23. #23
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    The data comes from a download off another data base. It comes in two ways depending on the dataabase used. Either a .txt file which the user then opens in excel and converts and saves to an excel file or a .csv file

    After new data is downloaded and converted to excel they cut and paste into the datasheet on the workbook you have already helped me with

    I was thinking of making the workbook just link to workbook that the user creates after his download and conversion,

    it might be easier to tell the user they have to save their download into the same drive and directory as the where there workbook is, rather then cutting and pasting

    Truth be known i would like to just create the whole thing into a stand alone program, but i do not know enough programming langague nor have to time to learn.

    I thought i might be able to import the data into a visual basic program and then have VB make the calculations.

  24. #24
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Data Validation List / Sort Problem?

    OK - this is getting to a point where it would be good to create a new thread (link to this for reference).

    I guess my only other point would be: what is the database platform ? You can use ADO to talk directly to any number of DB's passing SQL etc to do data extraction, ie you may be able to cut out the middleman, that is to say only use the XL file - run db query from XL directly.

  25. #25
    Registered User
    Join Date
    06-25-2009
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Data Validation List / Sort Problem?

    You are right, my problem I orignally posted has been solved and I thank you
    I am going to move onto now tryiing to replicate my excel worksheet into a standalone program using Visual Basic, any suggentions on where to post questions on that?

    Thanks again

  26. #26
    Registered User
    Join Date
    09-24-2009
    Location
    Mississippi
    MS-Off Ver
    Excel 2003
    Posts
    10

    Sort data containing cells validation

    I am trying to sort a spreadsheet that contains cells with validation.
    When I sort my data, the cells that contain the validation do not sort.
    Any suggestion?

+ 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