+ Reply to Thread
Results 1 to 19 of 19

How do I exclude data from 1 column using conditions from another column

  1. #1
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    How do I exclude data from 1 column using conditions from another column

    Just a simplified version of what I want to do.

    Cells A1:A50 contain various names in alphabetical order.
    Cells B1:B50 contain number values, anything from 0 - 1,000,000
    Cells C1:C5 contains 5 of the names from A1:A50 but are changed weekly

    Now, in D1:D5, I want to show the names from A1:A50 that have the highest values in B1:B50. Here's the problem. The names in the exclusion list (C1:C5) will still have values in the B column. I want a formula that ignores the names from C1:C5, even if they have 1 of the highest 5 values in the B column.

    Edit: Alternatively, display the top 5 values from B1:B50, again ignoring any value that is generated next to the excluded name.
    Last edited by Funky Gibbon; 12-15-2013 at 06:50 AM. Reason: Title change

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Exclusion list

    Post deleted.
    Last edited by Winon; 12-15-2013 at 07:08 AM. Reason: OP adhered to moderation request
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: Exclusion list

    Title changed, as requested.

    Apologies and thank you.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How do I exclude data from 1 column using conditions from another column

    Hi

    maybe

    Please Login or Register  to view this content.


    Regards
    Attached Files Attached Files
    Last edited by canapone; 12-15-2013 at 07:12 AM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Thank you very much Canapone. That did just what I wanted.

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: How do I exclude data from 1 column using conditions from another column

    Ciao,

    thanks for your kind feedback.

  7. #7
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Just noticed a new problem. If 2 of the cells within the B column have the same values only the 1st name, reading down column A is shown on each occasion. In the example placed above, I changed B9 from 984 to 5000. This results in A9 being used twice. Is there a way to find multiple names that have the same values in B.

    I apologise that this wasn't included in the original question. It was 1 of those things that I didn't even consider.

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    Can you post a SMALL sample file that shows what results you expect?

    About 20 rows worth of data is plenty.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Hi Tony, sorry for the delay in getting back to you, busy time of the year. Anyway, the sample file I am using is the 1 posted by Canapone in his 1st post. The actual file did exactly what I asked. My problem, as described above is that if 2 values in the B column match, the result is the name from column A showing twice.

    In Canapone's file I changed cell B9 from it's current value of 984 to 5000, same as B29. The result is the name from cell A9 appearing twice in the list generated in the D column. What I want is for individual names to show, even if they have the same value in the corresponding B cell

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    Based on the data in CANAPONE's file...

    This array formula** entered in D1:

    =INDEX(A$1:A$29,MATCH(LARGE(IF(ISNA(MATCH(A$1:A$29,C$1:C$5,0)),B$1:B$29-ROW(B$1:B$29)/100000),ROWS(D$1:D1)),B$1:B$29-ROW(B$1:B$29)/100000,0))

    ** 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.

    Copy down as needed.

  11. #11
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Thank you Tony. That works perfectly. Your time is much appreciated.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    You're welcome. Thanks for the feedback!

  13. #13
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Hello again. After transferring the above solution into my worksheet, I now have a 3rd problem. Under certain conditions, some of the values, that are in column B in the example used in this post, will be text.
    For the sake of example, I substituted the value in B1 for the word 'Full'. This now returns a #VALUE! in D1:D5. It's the same for a blank cell in B:B too.
    The blanks I'm not too worried about as they don't occur. The text cells do.

    How do I change "=INDEX(A$1:A$29,MATCH(LARGE(IF(ISNA(MATCH(A$1:A$29,C$1:C$5,0)),B$1:B$29-ROW(B$1:B$29)/100000),ROWS(D$1:D1)),B$1:B$29-ROW(B$1:B$29)/100000,0))" to ignore the text cells?

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    Post a SMALL sample file so I can see what the data looks like.

    I won't download files >50kb so make it a SMALL file.

    Like I said before, 20 rows worth of data is plenty.

  15. #15
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    How do I post a sample file? The attachments button in the 'Go Advanced' section doesn't work.

    Failing posting a sample file, I am still using the 1 from the top of the thread for experimenting. This is the 1 I changed the value in, as stated in my previous post.
    Last edited by Funky Gibbon; 12-15-2013 at 06:16 PM. Reason: added information

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    I'm not sure how to attach a file. I never need to do it!

    Try this:

    =INDEX(A$1:A$29,MATCH(LARGE(IF(ISNUMBER(B$1:B$29),IF(ISNA(MATCH(A$1:A$29,C$1:C$5,0)),B$1:B$29-ROW(B$1:B$29)/100000)),ROWS(D$1:D1)),B$1:B$29-ROW(B$1:B$29)/100000,0))

    Still array entered.

  17. #17
    Registered User
    Join Date
    12-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Home & Student 2013
    Posts
    33

    Re: How do I exclude data from 1 column using conditions from another column

    Great! Unfortunately I can't add any more reputation via the button on your post until I award it to someone else. All I can do is offer Kudos here.

    Thank you again. Hopefully I can put this to bed now.

  18. #18
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    Quote Originally Posted by Tony Valko View Post
    I'm not sure how to attach a file. I never need to do it!
    I should say:

    I don't remember how to upload and attach a file.

    When I have done it in the past I found it to be unintuitive so I just use another file hosting site.
    Last edited by Tony Valko; 12-15-2013 at 06:45 PM.

  19. #19
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How do I exclude data from 1 column using conditions from another column

    Good deal. Thanks for the feedback!

+ 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. Exclusion Filter?
    By ct711 in forum Excel General
    Replies: 1
    Last Post: 12-07-2011, 02:40 PM
  2. Replies: 0
    Last Post: 07-08-2011, 02:39 PM
  3. Cannot AutoFilter By Exclusion using VBA
    By CBG05QB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2011, 08:59 AM
  4. Find and replace exclusion
    By Johnf42 in forum Excel General
    Replies: 2
    Last Post: 03-06-2011, 07:36 PM
  5. Exclusion of Values in SUM/Percentage
    By nsorden in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-19-2009, 10:04 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