+ Reply to Thread
Results 1 to 16 of 16

Automatically fitering values through based on a criteria

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Automatically fitering values through based on a criteria

    Hi folks,

    My question today is how to automatically filter data from a database based on a criteria.

    I have a dynamic database which populates automaically and needs to feed substituent mini databases based on region (refer example). However, i cannot fathom how to do this since there are multiple reference points of the unique item (region) and hence vlookup/hlookup wont work.

    Does any of you experts guide me in achieving my objective?

    Many thanks,

    Best,
    Nazif
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Automatically fitering values through based on a criteria

    In D9 Cell

    =VLOOKUP(D6,G6:L15,MATCH(D5,G5:L5,0),0)


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    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,946

    Re: Automatically fitering values through based on a criteria

    Im not sure that you uploaded the correct file? It does not seem to match what you said you wanted

    However, to get the answer you show in that WB, you could use this...
    =INDEX($G$5:$L$15,MATCH($D$6,$G$5:$G$15,0),MATCH($D$5,$G$5:$L$5,0))
    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

  4. #4
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    Sorry about the attachment, sending through the correct file.
    Attached Files Attached Files

  5. #5
    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,946

    Re: Automatically fitering values through based on a criteria

    See if the attached will work for you. I used a Pivot Table, all you need to do us change the value in C1
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    Hey mate, thanks for that.

    But i want the filtering into different tabs to work automatically. The Regions are divvied into separate tabs and i want a function in those tabs that will intelligently pick up the relevant rows from the database.

    Cheers
    Last edited by Naz555; 02-05-2014 at 01:12 AM.

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Automatically fitering values through based on a criteria

    Put this formula's in each sheets.

    In A1 Cell
    =CELL("filename",$A$1)

    In B1 Cell
    =REPLACE(A1,1,FIND("]",A1),"")

    Enter the below formula In any of the cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX(Consol!D$7:D$39,SMALL(IF(Consol!$C$7:$C$39=$B$1,ROW(Consol!$C$7:$C$39)-MIN(ROW(Consol!$C$7:$C$39))+1),ROW(1:1))),"")

    Drag it down and right...

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

  8. #8
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    SO i need to replicate the array formula in each of the tabs, is that right? Thanks!

  9. #9
    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,946

    Re: Automatically fitering values through based on a criteria

    OK try this 1....
    Attached Files Attached Files

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Automatically fitering values through based on a criteria

    Yes exactly and also the formula's provided for A1 & B1 cells too

  11. #11
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    Fantastic mate! Work of a genius!! Thanks!!

  12. #12
    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,946

    Re: Automatically fitering values through based on a criteria

    @ Six, thanks for the feedback

    @ Naz...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. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can 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.

  13. #13
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    Hey FDibbins,

    Your solution works great as well! Appreciate much you lending your expertise!

    Cheers,

  14. #14
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    Hi Six,

    Based on your input I have constructed a table which works for certain criteria but not for all which I find to be bizarre. Please find attached a sample of the file (i had to make it much smaller in order to bring it below 1MB) and the contentious tab being the one named "Eastern Victoria". The area highlighted in orange contain the array formulas and the database sits in the tab named "Business Units".

    You will realise that when the tab named "Eastern Victoria" (which is the criteria essentially) is changed to "Northern Victoria" the relevant information is pulled through without an issue, but it doesnt work the same for any other criteria.

    Seeking your expertiese to me help me out.

    Many thanks,
    Naz
    Attached Files Attached Files

  15. #15
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Automatically fitering values through based on a criteria

    You current D34 Cell Formula of Eastern Victoria sheet

    =IFERROR(INDEX('Business Units'!B$2:B$781,SMALL(IF('Business Units'!$A$2:$A$781=$C$31,ROW('Business Units'!$A$2:$A$781)-MIN(ROW('Business Units'!$A$2:$A$781))+1),ROW(31:31))),"")

    Just change the ROW(31:31) to ROW(1:1) like the below

    =IFERROR(INDEX('Business Units'!B$2:B$781,SMALL(IF('Business Units'!$A$2:$A$781=$C$31,ROW('Business Units'!$A$2:$A$781)-MIN(ROW('Business Units'!$A$2:$A$781))+1),ROW(1:1))),"")

    Drag it down and right...

  16. #16
    Registered User
    Join Date
    07-10-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Automatically fitering values through based on a criteria

    You are such a life saver! Thanks much mate!

+ 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. macro to automatically list name based on criteria
    By jw01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2013, 06:06 PM
  2. [SOLVED] How to sum values based on multiple criteria with multple possibilities for each criteria?
    By boredaxel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-05-2013, 02:26 AM
  3. Automatically copy values based on unique/new criteria from a range
    By djarcadian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2013, 08:45 PM
  4. Automatically Generated list based on criteria
    By genichigo in forum Excel General
    Replies: 2
    Last Post: 03-21-2013, 02:21 PM
  5. Auto deletion of worksheets based on multiple criteria, and automatically returning values
    By iamrickdeans in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2013, 01:52 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