Hi All,
I have a string in the excel where I need to identify the particular keyword in that string and find the length of the string position where it occurs. Please find the attached excel.
Thanks
Hi All,
I have a string in the excel where I need to identify the particular keyword in that string and find the length of the string position where it occurs. Please find the attached excel.
Thanks
Last edited by sathishkm; 07-12-2021 at 06:37 AM.
Try this...
=IF(ISERROR(SEARCH(" at ",A2)),0,LEN(A2))
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Result are coming wrong. Please check the attachment.
Try this formula instead in B2:
=IFERROR(SEARCH(" at ",A2)-1,LEN(A2))
then copy down as required.
Hope this helps.
Pete
Results are coming wrong.
try
=IFERROR(SEARCH(" at ",A2)-1,LEN(A2))
Result are coming wrong. Please check the attached excel
You are confusing us...
=IFERROR(SEARCH(" at ",A2)-1,0)
Try this:
=IFERROR(FIND(" at ",A2)-1,0)
Are you still using Excel 2007???
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.
Try:Formula:Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
1. You have changed the 1st file you posted. I dont recall the rest of the values, but the 1st number you gave was definitely 48, not 40!! Please do not change the data you provide - if you need to change it, add a 2nd file.
2. explain how you arrive at (the new value of) 40 when "at" starts at position 42 please
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks