+ Reply to Thread
Results 1 to 20 of 20

Filter data from 2 columns

  1. #1
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Filter data from 2 columns

    Hello
    How to filter out goods that don't have NUMBER and goods that have and don't have NUMBER?
    For example

    PIEKARNIK BIE25300X BEKO 2815447760/ 10
    PIEKARNIK BIM24301 BEKO 2815437210/ 30
    PIEKARNIK BIS14305 BEKO
    PIEKARNIK BIS14305 BEKO 2815370542/ 20
    PIEKARNIK BIS14305 BEKO 2815387663/ 10
    PIEKARNIK FCT615NXL CANDY
    effect
    PIEKARNIK BIS14305 BEKO
    PIEKARNIK BIS14305 BEKO 2815370542/ 20
    PIEKARNIK BIS14305 BEKO 2815387663/ 10
    PIEKARNIK FCT615NXL CANDY
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,860

    Re: Filter data from 2 columns

    Suggest you supply criteria for keeping or removing. The term NUMBER is not sufficient.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    any exmple?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,418

    Re: Filter data from 2 columns

    Your sample makes no sense. Give more details about what you want.

    Your workbook does not contain any manually mocked up results ...
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    I don't know how to explain it easier.

    I want to filter out only goods without NUMBER (COLUMN C) and the same goods that don't have NUMBER and have NUMBER. here's easier example.

    GOODS NUMBER
    A 123
    B
    B 456
    C
    C 789
    C 7899
    D
    E 999

    after filter

    B
    B 456
    C
    C 789
    C 7899
    D

    Or another way. Goods that have NUMBER nad don't have their counterparts without number shouldn't be displayed.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,418

    Re: Filter data from 2 columns

    No, sorry - makes no sense to me at all. Someone else may understand your logic.

    The attachment is useless - it does not show what you are aiming for. You need a BEFORE and AFTER.
    Last edited by AliGW; 09-15-2021 at 03:47 AM.

  7. #7
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Filter data from 2 columns

    Try this: =IF(AND(COUNTIF($B$3:$B$861,B3)=1,C3<>""),"Filter out", "Keep")
    This is what makes sense to me based on your explanation
    Click the * to say thanks.

  8. #8
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    Here's before and after done maunally
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    Quote Originally Posted by PaulM100 View Post
    Try this: =IF(AND(COUNTIF($B$3:$B$861,B3)=1,C3<>""),"Filter out", "Keep")
    This is what makes sense to me based on your explanation
    NOT working. something is bad and gives me error.

  10. #10
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Filter data from 2 columns

    First, for anyone looking at the attachments to post #8, they are csv files not xls files.

    Please paste the following formula into cell J3 then copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This matches your expected results from post #8

    You say in post #9 that PaulM100's attempt gave you an error. It may be that in your region function arguments are separated with semicolons rather than commas. If that is the case then replace all the "," in the above formula with ";"

    Let us know if this works for you.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  11. #11
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    Your formula is working after changing from , to ;
    But it is not working like I wanted. Just look at this

    Attachment 748147
    2998456500_1631914678.png

    This should be all keep. But formula set two to filter out and rest to keep. Something is wrong.
    Last edited by locarnos; 09-17-2021 at 05:39 PM.

  12. #12
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Filter data from 2 columns

    When I apply my formula to your before1 file in post #8 then all 6 lines that you show in post #11 evaluate to "keep". See the attached workbook.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Filter data from 2 columns

    Let us know whether or not you still have a problem. If you do then please attach a workbook showing the problem - a workbook is much more useful than a picture.

  14. #14
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    here you have full workbook with more data
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    I still have problem because it is not working on bigger workbook.

  16. #16
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Filter data from 2 columns

    I'm not sure what you are doing with your attachments. 14.xls is not an Excel file it's actually a CSV file that somehow has had its extension renamed

    Regardless, I applied the formula that I provided to you in post #10 to your post #14 attachment and observed no problem. You note in your post #11 that the problem was that lines 75 and 76 say "filter out" but should say "keep". I don't see that. Lines 75 to 80 ALL say "keep" as you are expecting.

    I do note that your post #14 file has data down to row 939 whereas the formula that I provided only goes down to row 900. I changed the formula to look down as far as row 1000 but that made no difference to rows 75-80 - they all correctly say "keep".

    Attached is an XLSX file with your post #14 data and my formula applied. If the problem that you are now seeing is with some rows OTHER than 75 and 76 then please tell us explicitly what the problem is and with which lines.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    Now it work ok. It is xls file because this is how another tool creates it.

  18. #18
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    One more questions. Does the same products must be next to each other or it could be mixed?

  19. #19
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Filter data from 2 columns

    No, I don't think the same products need to be next to each other. It should work fine if they are not. But if you see a specific problem, let us know.

  20. #20
    Registered User
    Join Date
    01-24-2019
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    19

    Re: Filter data from 2 columns

    ok> so for now problem is solved. now I need to solve this. https://www.excelforum.com/excel-new...ml#post5568158

+ 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 with data from several columns
    By Jocce in forum Excel General
    Replies: 4
    Last Post: 01-16-2019, 09:22 PM
  2. [SOLVED] Filter data by Columns (a,b,c etc) and mark the top 3 items for each filter.
    By margetc in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-15-2018, 04:18 AM
  3. [SOLVED] filter data from columns
    By peter_swe in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 05-28-2015, 11:51 PM
  4. Macro to filter data and copy the data's from multiple columns based on the criteria
    By millatshawn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2014, 08:14 AM
  5. Filter data based on columns, display unique row data
    By djarcadian in forum Excel General
    Replies: 14
    Last Post: 05-18-2013, 07:18 PM
  6. How to Filter Data with Non merged columns in one
    By motivationalist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-09-2013, 04:48 PM
  7. Filter and sum data from selection columns
    By dems in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-21-2009, 11:31 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