I have a column with data that looks like this:
Day |
---|
D003 |
D004 |
D008 |
D010 |
D012 |
D028 |
And in the next column, I need to extract just the 3, 4, 10, 12, etc. with NO leading 0's. I tried the following:
=IF(D8="D003 Predose","30",IF(D8="D003 End","31",IF(D8="D003 4hours","34",RIGHT(D8,LEN(D8)-FIND(RIGHT(SUBSTITUTE(D8,"0",""),1),D8)+1))))
Which works for the 4, 5, 8. But for the 12, 17, 21, etc it only gives me the last number. How do I account for the variable length of those strings? I'm really new at Excel and creating formulas "from scratch" so I apologize if the answer is right in front of my nose. If there's a cleaner way to do this, I'm also all ears.