+ Reply to Thread
Results 1 to 18 of 18

Extract unique, consecutive rows, first character from string

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Extract unique, consecutive rows, first character from string

    I have in Column A these strings, I would like to extract First character only, unique, in consecutive rows
    Column A
    A222
    A333
    B123
    D345
    A678
    Z256
    A456
    B777

    At B1 result should be :
    A
    B
    D
    Z

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

    Re: Extract unique, consecutive rows, first character from string

    With Power Query called Get and Transform in your version and found on the Data Tab

    Please Login or Register  to view this content.
    Attached Files Attached Files
    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
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,296

    Re: Extract unique, consecutive rows, first character from string

    Apply the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Extract unique, consecutive rows, first character from string

    This works on my version of excel
    Available for:

    Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel for iPad Excel for iPhone Excel for Android tablets Excel for Android phones.

    The UNIQUE function returns a list of unique values in a list

    Formula for B1 =UNIQUE(LEFT(A1:A8,1))
    Last edited by mehmetcik; 10-10-2020 at 11:51 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Extract unique, consecutive rows, first character from string

    Please try at B1

    =IFERROR(CHAR(AGGREGATE(15,6,CODE(A$1:A$8)/(FREQUENCY(CODE(A$1:A$8),CODE(A$1:A$8))>0),ROWS(B$1:B1))),"")

  6. #6
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract unique, consecutive rows, first character from string

    For some reason #5, I can not make it work

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

    Re: Extract unique, consecutive rows, first character from string

    Is that it? What about the other two suggestions? And what about the detailed response I gave in your other thread? If people bother to try to help you, at least have the courtesy to acknowledge it.
    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.

  8. #8
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract unique, consecutive rows, first character from string

    All ok, I have left them feedback, just wanted to let Bo know that something I can not make it work in his formula, usually he is very good at

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Extract unique, consecutive rows, first character from string

    When something doesn't work, please provide more detail and attach the workbook.
    Attached Files Attached Files

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

    Re: Extract unique, consecutive rows, first character from string

    All ok, I have left them feedback, just wanted to let Bo know that something I can not make it work in his formula, usually he is very good at
    Really, and what form of communication did you use. I have not received any acknowledgement or information from you regarding my proposed solution.

  11. #11
    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,318

    Re: Extract unique, consecutive rows, first character from string

    Nor have I, Alan, for the detailed response I gave in the other thread. Seems like common courtesy is too much to ask.

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

    Re: Extract unique, consecutive rows, first character from string

    @AliGW--Seems to be the way of life these days in forums. Truly sad. Wonder why I go to the trouble to offer help some days.

  13. #13
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract unique, consecutive rows, first character from string

    Bo, thanks for attached file, now all ok !

  14. #14
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Extract unique, consecutive rows, first character from string

    @ionelz Did you read Alansidman, AliGW, Mehmetcik's comments?

    I would not happy to offer free help and not get any feedback.

  15. #15
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Extract unique, consecutive rows, first character from string

    Sorry, something must be wrong, I left reputation to ALL which help on this !
    But : #2 works but I wanted Formula, #3 works, #4 I was not able to use it since I do not have Unique, and #5 and #9 works
    AT #9, only if you want, I still have an issue, but that because I was not explained right at beginning.
    If I have at least one EMPTY row, it doesn't work
    At H4, if I reduce Table height from F16 to F12 it works, but with empty rows no
    Attached Files Attached Files

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

    Re: Extract unique, consecutive rows, first character from string

    Thanks for the detailed feedback.

  17. #17
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Extract unique, consecutive rows, first character from string

    Response #15

    H4 cell , formula , Drag down

    HTML Code: 
    Bo_Ry #9, the formula can still be used, just a small modification

    Array formula , This formula is better and can be arranged in order, from small to large

    HTML Code: 

  18. #18
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Extract unique, consecutive rows, first character from string

    Pleas try
    with sort
    =IFERROR(CHAR(AGGREGATE(15,6,CODE(B$4:B$16)/(FREQUENCY(CODE(B$4:B$16&" "),CODE(B$4:B$16&" "))>0),ROWS(D$4:D4))),"")

    or no sort
    =IFERROR(LEFT(INDEX(Table1[Cells],MATCH(TRUE,INDEX(ISNA(MATCH(LEFT(Table1[Cells]),H$3:H3,)),),))),"")
    Attached Files Attached Files
    Last edited by Bo_Ry; 10-13-2020 at 02:39 AM.

+ 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. extract last one or multiple consecutive words as suffix from text string
    By excelkbhalla in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-24-2019, 04:10 PM
  2. [SOLVED] Extract 2nd Character after space in string
    By sintek in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-08-2017, 08:12 AM
  3. [SOLVED] extract everything to the right of a character in string
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2017, 12:12 AM
  4. Extract unique value from column of consecutive repeated values
    By hamang in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-26-2016, 04:37 AM
  5. [SOLVED] extract string after nth string (special character)
    By itselflearn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2013, 03:18 PM
  6. Replies: 1
    Last Post: 09-02-2011, 05:00 PM
  7. Extract Certain character from string
    By Kou Vang in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-25-2006, 03:30 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