+ Reply to Thread
Results 1 to 11 of 11

Excel formula to sort or filter rows based on a cell value

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Excel formula to sort or filter rows based on a cell value

    I am attaching here with the sample sheet with my vba which which give you filtered rows based in cell value g1 it searches column c and filter rows

    can it be done through any formula

    as my ultimate purpose is to make web page of my excel which is not possible along with my vba

    kindly help

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Excel formula to sort or filter rows based on a cell value

    I think you forgot to attach your sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Excel formula to sort or filter rows based on a cell value

    Sample is attached
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Excel formula to sort or filter rows based on a cell value

    Now uploaded sir

    mostly importantly the search is not case sensitive

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Excel formula to sort or filter rows based on a cell value

    So, you only want to filter based on column C, and the filtering is based around what you put in cell G1 ?

    If you are hoping to filter using formulae, it would be better to do so on another sheet - you enter the filter parameter in one cell (like you do at the moment) and the filtered results are shown in columns A to C of that sheet. The data in Sheet1 remains unchanged.

    Is this acceptable to you?

    Pete

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726
    Yes sir

    But will it work in web page or app conversion
    Last edited by AliGW; 10-16-2018 at 05:48 AM. Reason: Quotation removed - not needed.

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Excel formula to sort or filter rows based on a cell value

    Actually i want to use it on my android ph and android does not support vba so i thought of using formulas.

    Kindly help that way sir

    I want something which can serve my this purpose over my android ph

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Excel formula to sort or filter rows based on a cell value

    Take a look at the attached file. I've not changed your Sheet1, and set everything up in Sheet2.

    Put your desired word in G1 (coloured yellow), and the appropriate data is shown filtered in columns A to C.

    I don't know if this will work in android - you'll have to test it out yourself.

    Hope this helps.

    Pete
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    726

    Re: Excel formula to sort or filter rows based on a cell value

    Yes sir that is what was required ,but in my excel number of rows are more than 10000
    So formulas are taking too much time with processors.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Excel formula to sort or filter rows based on a cell value

    It might be a bit quicker if you change the formula in F2 of Sheet2 to this:

    =IF(Sheet1!C2="","-",IF(ISNUMBER(SEARCH(" "&$G$1&" "," "&Sheet1!C2&" ")),COUNTIF(F$1:F1,">0")+1,"-"))

    and copy it down. I've changed the MAX to COUNTIF.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark this thread as SOLVED.

    Also, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Hope this helps.

    Pete

  11. #11
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,810

    Re: Excel formula to sort or filter rows based on a cell value

    Note also, that although the formula in column F needs to be copied down for as much data as you have in Sheet1 (i.e. 10,000+ rows), the formulae in columns A:C do not need to be copied as far - just sufficient to display the amount of data after filtering.

    Pete

+ 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. Filter duplicate rows based on cell value
    By CP123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2017, 12:04 PM
  2. Macro to filter, sort, and then display top 20 rows based on value in particular cell
    By shaunguyver in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2015, 07:18 AM
  3. How to sort rows in Excel into different sheets using a filter
    By lukeafuller in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2014, 04:29 AM
  4. [SOLVED] Sort and delete rows based on the values in a cell?
    By thup_98 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2013, 09:45 AM
  5. [SOLVED] Sort Rows Alphabetically Based on Cell In Row Data
    By Jrub in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-12-2012, 05:29 PM
  6. Auto Filter, Sort and Hide cells based on cell value
    By kal46 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2012, 05:09 PM
  7. Programmatically sort rows separately based on value in cell?
    By brianala in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-14-2009, 10:22 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