Using Excel's Find and Mid to extract a substring when you don't know the start point.
In order to extract the first two characters that follow the dash, you’ll use the Find function to locate the dash and add 1 to that result. (The Find function returns the location of the dash; you want to start extracting characters beginning at the next character, the one following the dash.)
So our formula looks like this: =MID(A2,FIND("-",A2)+1,2)
Link to Full Article
excel programming
Moderator: sjj1805
- sjj1805
- Site Admin
- Posts: 1194
- Joined: Fri Oct 27, 2006 12:45 am
- motherboard: Hewlett Packard 2AF7
- system_drive: C
- 32bit or 64bit: 64 Bit
- processor: 2-90 gigahertz Intel Core i5 4460S
- ram: 8 GB
- video card: NVIDIA GeForce GT 705
- sound card: P40D100-4 NVIDIA High Definition Audio
- Hard_Drive_Capacity: 8 TB
- Location: Birmingham UK
- Contact: