Hi I want to get marks obtained for the student whose name has 8 characters... How can I do that?
Hi I want to get marks obtained for the student whose name has 8 characters... How can I do that?
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.
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?
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
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.
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...
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.
But I did not understand one thing why did you put two dashes before length function in the first solution?
=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))
Got it...Thank you sir...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks