+ Reply to Thread
Results 1 to 33 of 33

Search and see only the searched data

  1. #1
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Search and see only the searched data

    Hey everyone, first off happy New Year! Second thanks to everyone that helped me out last time.

    I've included the file I'm working on.

    What I'm trying to do is add a search function or filter function for any of the columns. I want that search to give me just the results for the that search. Not sure it that makes sense. So I filled in a little sample data. Line 29 is where all my totals are. So let's say I want to sort it out by track, I want to see just the results for AQ. How would I do that? Or in the I column, I want to look up all the 3SL and see just the results that have 3SL in row 29.

    I hope I've giving enough information to answer my question, please post if you need more info and what info you would need.

    Records.xlsx

    Thank you so much everyone!

    Matt

  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,945

    Re: Search and see only the searched data

    Not sure if this is what you want, but take a look at using filters.

    On the Home tab, click Sort and Filter, and then select Filter.
    You will see that each column now has a small drop-down. Click the Track 1, uncheck All and check what you want to see
    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
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Search and see only the searched data

    Hi Matt,

    Change your SUM() fuctions.

    To see the count of the filtered items use
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    To see the sum use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Hey Rich,

    I think that's what I was looking for. I'm going to play around with it later today.

    Thanks a lot!

  5. #5
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Hey Rich,

    Just an update and follow up question.

    This worked great!

    Now I'm wondering if there is a way see just the sub totals when filtered.
    So when I filter, I see the filtered stuff but I still see the sub totals of everything.
    Is there a way to see just the sub totals of the filtered?

    Thanks
    Matt

  6. #6
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Can anyone out there help me out? Or do I need to be more specific?

    Thanks a lot guys.

    Matt

  7. #7
    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,945

    Re: Search and see only the searched data

    Do you have an updated version of your file?

  8. #8
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Yes Ford, here you go. Thank you.
    Attached Files Attached Files

  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,945

    Re: Search and see only the searched data

    OK so what would your expected outcome look like?

  10. #10
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Ford,

    I like to feel out certain things and see just the results on the bottom. So say I want to filter out all the sprints in the S/R column. Now on the bottom where all the results are I'd like to see just the results for routes.

    Or in the type column I want to see just the bottom line for ALW, how could I do that?

    Does that make sense?
    Matt

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hi Dirty,

    Try this - it works on a double click in the non-numeric columns up to G - it will filter for any value you double click upon in those columns and if you doubleclick anywhere on the sheet it will restore the data to its unfiltered state:Dirty.xlsm
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  12. #12
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    I downloaded and tried to open that file. Says it trying to open in protected view and never actually opens.

  13. #13
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Ok I got it working.

    Now when I double click, it works like you say it would. Now how can I see the totals of just the stuff I double click?

  14. #14
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    I'll have to see whether I can accommodate you tomorrow

  15. #15
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Thank you very much!

  16. #16
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Sorry Dirty, I need another day

  17. #17
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    No worries Take your time.

  18. #18
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hey Dirty,

    Where should I put the "Totals"??

  19. #19
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    At the bottom would be good, I guess.

    Thank you so much for the help.

  20. #20
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hi Dirty,

    I interpreted "the bottom" to mean row 378 for this sample - see how you like it Dirty.xlsm

  21. #21
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hi Dirty,

    You may want to change the code to what I have in red here:

    Please Login or Register  to view this content.

  22. #22
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Downloading now! Thank you so much!

    Also I have to be honest. I have no idea what that means.The code part.

  23. #23
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    DUDE! That's amazing!

  24. #24
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    So now that you have shown me, can you teach me? How could I add that code from "G" onward?

    Also how can I compensate you? That's was exactly what I was looking for!
    Last edited by dirty moose; 03-24-2015 at 08:17 PM.

  25. #25
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hi Dirty,

    To change the code - with the spreadsheet up hit Alt + F11 and you'll see the code in front of you - for the fix above just change the:

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    i.e. just delete the Contents part.

    To go on from Column G will screw up the id feature wherein you can see right in the Totals bar what term was filtered, I need to know what else you want to see in order to make that possible.

    To reward me, just click on the little star at the bottom left of any of my posts and award me reputation points
    Last edited by xladept; 03-25-2015 at 01:50 PM.

  26. #26
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Reputation added! Thank you so much.

    I'd like the formula to go all the way over the the column that says "odds" . I don't have the sheet open in front of me but I think it's the R column....

  27. #27
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Hi Dirty,

    Thanks for the rep and the compliment!

    Replace the whole code with this - I think it's what you want - I put the filter description for H and above in the G-Slot.

    Please Login or Register  to view this content.

  28. #28
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    Yes that worked with one exception, I think, this is a little nit picky but how could I change the format on some cells upon double clicking? Example when I double click column T; I want to see the format changed to currency. Is this possible?
    Last edited by dirty moose; 03-25-2015 at 08:41 PM.

  29. #29
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    I can Format T as Currency permanently??

  30. #30
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    I'd like to format E as number, 1 decimal place. T,U,V,W as currency $ with 2 decimal places please.

    Again thank you so much!

  31. #31
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    Replace the whole code or just add the red code

    Please Login or Register  to view this content.

  32. #32
    Registered User
    Join Date
    10-02-2014
    Location
    NYC
    MS-Off Ver
    Professional Plus 2010
    Posts
    27

    Re: Search and see only the searched data

    You're amazing! That is all I can say.
    I wish I could give you more rep. or better compensate you for your work.

    Thank you again.

    Matt

  33. #33
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Search and see only the searched data

    You're welcome again - perhaps you can write some tweaks with what I've shown 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. How do you create a search engine that finds a row containing a certain word when searched
    By nathandavies in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2014, 06:30 AM
  2. Replies: 2
    Last Post: 02-15-2014, 12:03 AM
  3. [SOLVED] Macro to search all sheets and return corresponding rows of searched value
    By amar05 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2013, 01:56 AM
  4. Macro to search and highlight a cell prior to the searched cell
    By gjccks in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-15-2013, 01:51 PM
  5. Stopping VBA Search from showing error if searched item does not exist
    By viralshade in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2013, 09:37 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