+ Reply to Thread
Results 1 to 9 of 9

Check which entry has character length 8

  1. #1
    Registered User
    Join Date
    07-19-2022
    Location
    India
    MS-Off Ver
    2019
    Posts
    16

    Check which entry has character length 8

    Hi I want to get marks obtained for the student whose name has 8 characters... How can I do that?
    Attached Images Attached Images

  2. #2
    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,981

    Re: Check which entry has character length 8

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Check which entry has character length 8

    You cna use:

    =INDEX(B$2:B$10,MATCH(1,INDEX(--(LEN($A$2:$A$10)=8),0),0))

    copied across. See file & adapt the ranges to suit...

    Can there be more than 1 with a string length of 8? if so, what do you want to happpen?
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: Lá fhéile Pádraig sona dhaoibh

  4. #4
    Registered User
    Join Date
    07-19-2022
    Location
    India
    MS-Off Ver
    2019
    Posts
    16

    Re: Check which entry has character length 8

    It worked .. Thank you so much, I was stuck in this problem from last week. But I did not understand one thing why did you put two dashes before length function?
    Also no there cannot be more than one cell with length 8 .. but can you tell me what can we use if we get more than one cell with same length ?
    Last edited by learning_bee; 07-21-2022 at 09:53 AM.

  5. #5
    Registered User
    Join Date
    07-19-2022
    Location
    India
    MS-Off Ver
    2019
    Posts
    16

    Re: Check which entry has character length 8

    Thank you so much....I am new here so i didn't know about this but I will keep that in mind from now on...

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Check which entry has character length 8

    yES.

    =IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($A$2:$A$10)/(LEN($A$2:$A$10)=8),ROWS(H$2:H2))),"")

    copied across and down.


    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-19-2022
    Location
    India
    MS-Off Ver
    2019
    Posts
    16

    Re: Check which entry has character length 8

    But I did not understand one thing why did you put two dashes before length function in the first solution?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,064

    Re: Check which entry has character length 8

    =INDEX(B$2:B$10,MATCH(1,INDEX(--(LEN($A$2:$A$10)=8),0),0))

    LEN($A$2:$A$10)=8

    returns as series of TRUE or FALSE results. the -- converts those into 1 and 0... MATCH is looking for the first 1 it sees.

    It could, equally, have been written as:

    =INDEX(B$2:B$10,MATCH(TRUE,INDEX(LEN($A$2:$A$10)=8,0),0))

  9. #9
    Registered User
    Join Date
    07-19-2022
    Location
    India
    MS-Off Ver
    2019
    Posts
    16

    Re: Check which entry has character length 8

    Got it...Thank you sir...

+ 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. [SOLVED] If / then statement for character length within a cell
    By kerrya98 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-23-2012, 02:21 PM
  2. Check the length and value of specific columns and comparion check between two sheets
    By sravanthi.boggaram in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2011, 06:51 AM
  3. sorting by character length
    By monkfunk in forum Excel General
    Replies: 1
    Last Post: 10-03-2010, 12:13 PM
  4. Fix Column Character Length
    By tek9step in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 04-22-2010, 12:01 PM
  5. String Character Length?
    By koticphreak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2008, 01:08 AM
  6. Character Length
    By mlr0911 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2007, 04:25 PM
  7. assigning character length in a cell
    By audrey in forum Excel General
    Replies: 4
    Last Post: 07-30-2006, 11:45 AM
  8. Find character when the length varies
    By Rookie_User in forum Excel General
    Replies: 3
    Last Post: 04-12-2006, 02:20 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