Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Search & Replace

0

I have a number of record IDs I need to strip 16 characters off in order to load them in a database.  Here is an example - 0011A00001TbtjJ?srPos=0&srKp=001

I need to remove everthing starting with the ? and to the right of the ?  Each ID is unuque expect they all have a ? that begins the string I need removed so the characters to the left of the ? are left.  

Make sense?

Thanks

Jim

Answer
Discuss

Answers

0

This formula will return a string comprising of everything from the left to the question mark. Your sample string is in cell A1.

=LEFT(A1,FIND("?",A1)-1)
Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login