+ Reply to Thread
Results 1 to 16 of 16

arrangement of different Cells, which need to be filtered out first

  1. #1
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    arrangement of different Cells, which need to be filtered out first

    Hello Forum, i am very new and i would like to get a Problem solved with your help... so lets go for it: (please note, english is not my native language,)

    in every Cell in one given Line i either have the cell filled with the number 1 or the number 2. Example below

    A B C D E F G H I J K L M N..... till 100 (CV)
    4. 1 2 1 2 2 1 2 1 2 1 1 2 1 1..... till 100 (CV)
    5. 2 1 2 1 2 2 2 1 1 1 2 2 1 2..... till 100 (CV)

    now, i would like to give a command to filter line 4, from left to right, and find a pattern, that appears first! (in the filled Cells (1 or 2))

    for example.: Excel, should now look in 4th line from "A" to "C V" and mark the pattern that appears first. For example mark it red. if the 2nd pattern appears first, mark the second pattern for example yellow. ( i will upload an xls. doc with a small example so to make things more clear.)

    so i need a function that tells Excel... to look in line 4 --> From file "A" till file "C V" which pattern appears first, and mark it either red or yellow.

    Patterns:
    First Pattern Formation to search in line : 1 2 1 2
    Seco. Pattern Formation to search in line: 2 2 2 2

    the pattern that appears first should be marked, so that it is clear which appeared first.

    HOPE you can help me


    Kind regards branko

    note: basically its not important how to mark it, it just should recognize which "searched" pattern appears first, in the looked line (from left to right), and give a sign which one it was, doesnt matter if it marks red or yellow, its important to find it.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: arrangement of different Cells, which need to be filtered out first

    I'm sure there are more elegant/shorter solutions but here's the Conditional Formatting formulas I came up with
    For 1212
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and for 2222 (basically the same formula but ending with "=2")
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    thank you very much for your answer and effort! the only thing is, for example, i want to have 100 (1-100) rows filled from "A" to "C V" with 1 or 2 , that is written in Cells..
    and i would need a drag down function that marks out which combination appeared first in which row.

    so if i fill a lot of cells with 1 or 2 . i want to drag over them and to can visually see when it appeared first time and which combination of 2 possible combination came up first.

    for example i have the whole fiel with 1s and 2s filled. i want him to can drag down and mark the first wich appears. (1 2 1 2 against 2 2 2 2 ) now show me in every line which one appeared first and where it appeared first.

    is that maybe possible?

    THANK YOU FOR YOUR 1. ANSWER!

  4. #4
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    i made an excel sheet, where you can see all line with filled CELLS 1 and 2, and to find the first appearing sequence of the two given in every line ... and make some kind of a mark to see where it is.

    i hope its clearer now (my vision)

    KR, branko
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: arrangement of different Cells, which need to be filtered out first

    Yes, the conditional formatting can be applied to all rows at once. Just select your range (i.e. A6:CV250) and then apply the formula as written for the first row (i.e. row 6)
    It will adjust for all rows.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    wow

    what a hero you r to me right nooow no joke! thanks 1000 times.

    so my last question if i would wann search sequence 12121 and 22222
    i just change the numer 1212 to 12121 AND 2222 to 22222 ? in the formula?

    so i can try different two Formation against each other?

    10.000 thanks! really cool

  7. #7
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    i could do it alone neede to make +4 and change 1212 to 12121 and 2222 to 22222

    looks :

    =UND(SPALTE()>=MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999)); SPALTE()<=MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999))+4; INDEX($A6:$CV6;MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999)))=2)

    =UND(SPALTE()>=MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999)); SPALTE()<=MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999))+4; INDEX($A6:$CV6;MIN(WENNFEHLER(SUCHEN("12121"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999); WENNFEHLER(SUCHEN("22222"; TEXTVERKETTEN("";FALSCH;$A6:$CV6));999)))=1)


    am i right? the graph looks good marked ))))))

    THX

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,434

    Re: arrangement of different Cells, which need to be filtered out first

    Try this to translate your formulae into English: https://en.excel-translator.de/translator/
    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.

  9. #9
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    =AND(COLUMN()>=MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999)), COLUMN()<=MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999))+4, INDEX($A6:$CV6,MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999)))=2)

    =AND(COLUMN()>=MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999)), COLUMN()<=MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999))+4, INDEX($A6:$CV6,MIN(IFERROR(SEARCH("12121", TEXTJOIN("",FALSE,$A6:$CV6)),999), IFERROR(SEARCH("22222", TEXTJOIN("",FALSE,$A6:$CV6)),999)))=1)


    OK like that? KR

  10. #10
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    i tried 11212 and 11121 but its not working?
    is there a need for which is put in first? and with 1 ? and with 2?

    KRR

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: arrangement of different Cells, which need to be filtered out first

    Is it 11212 and 11121 or is it 12121 and 22222? In this case, the order of the formulas is not important.
    Last edited by ChemistB; 04-12-2021 at 02:15 PM.

  12. #12
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    it is 11212 and 11121.

  13. #13
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    it doesnt take the second one, one works out but the second one not. ?
    Hmm idk..

    Attachment 728020

  14. #14
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: arrangement of different Cells, which need to be filtered out first

    See attached workbook

    Is this what you are looking for? Minor changes to the previous equations.

    I can't read your latest attachment.
    Attached Files Attached Files
    Last edited by ChemistB; 04-12-2021 at 02:58 PM.

  15. #15
    Registered User
    Join Date
    04-12-2021
    Location
    Vienna
    MS-Off Ver
    2016
    Posts
    10

    Re: arrangement of different Cells, which need to be filtered out first

    thanks i was looking for that ))) i dont know what that means, the main thing is i want to test a few pairs against each other. so i will try out :D thank you

  16. #16
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: arrangement of different Cells, which need to be filtered out first

    If you're going to try a variety of different combinations, we can modify the formulas to refer to cells rather than hard coding the different combinations into the formulas.

+ 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. Replies: 1
    Last Post: 09-27-2019, 04:32 PM
  2. Google Sheets - How to create graph from cells referencing other cells sorted/filtered dif
    By ergalthema in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 03-05-2018, 02:35 PM
  3. Replies: 0
    Last Post: 03-05-2018, 02:35 PM
  4. [SOLVED] Filtered Cells To Automatically Move Visible Cells To Top Of Table..?
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2017, 05:55 AM
  5. Replies: 3
    Last Post: 02-02-2017, 03:04 AM
  6. [SOLVED] Count cells containing Dates (greater than 2014) based on Filtered Cells
    By sam99 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-26-2014, 10:30 AM
  7. Replies: 7
    Last Post: 08-16-2010, 05:40 AM

Tags for this Thread

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