dimanche 22 février 2015

IF AND MID FUNCTION NEED HELP PLEASE

I have tried finding this answer and althought I see related posts, I still can't figure it out. My apologies in advance if it is there and I coudn't find it.


So I have a list of VIN numbers (17 characters) and the 10th character is the model year - which could be a letter or a number. I read somewhere that IF functions will only accept 7 levels, I have 16 levels of conditions: G 2016 F 2015 E 2014 D 2013 C 2012 B 2011 A 2010 9 2009 8 2008 7 2007 6 2006 5 2005 4 2004 3 2003 2 2002 1 2001


I started creating the formula anyway (just a few levels not the entire 16) but the value I get back is "FALSE". I'm sorry if this is a silly question, I'm not that proficient as you can probably see :)


=IF(MID(A1,10,1)=1,2001,IF(MID(A1,10,1)=2,2002,IF(MID(A1,10,1)=3,2003,IF(MID(A1,10,1)=4,2004,IF(MID(A1,10,1)=5,2005,IF(MID(A1,10,1)=6,2006,IF(MID(A1,10,1)=7,2007)))))))


Any help will be appreciated. Perhaps different combination of formulas will work better? thanks again


Aucun commentaire:

Enregistrer un commentaire