ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replacing cells that have 2-3 letters: Sorry for the vague question (https://www.excelbanter.com/excel-programming/311530-re-replacing-cells-have-2-3-letters-sorry-vague-question.html)

drewd[_3_]

Replacing cells that have 2-3 letters: Sorry for the vague question
 

--------------------------------------------------------------------------------

What I need to replace the cells that have 2-3 letters is:
"Not A Defect Code!!!"
I have a sheet that has many different defect codes such as:
MC
WP
MPI,ect,ect
All of these will be change to the defect code they represent.
I could not figure out how to change a defect code that was improperl
entered in such as:
"FC": to "Not A Defect Code!!!"

thank you for the help
Dre

--
drew
-----------------------------------------------------------------------
drewd's Profile: http://www.excelforum.com/member.php...fo&userid=1474
View this thread: http://www.excelforum.com/showthread.php?threadid=26371


dave_d[_4_]

Replacing cells that have 2-3 letters: Sorry for the vague question
 

I have done something similar by using Vlookup() , you could have
table with the short codes and their descriptions. Then insert
column in your data with a Vlookup formula that looks up the short cod
in your table, Make sure that you enter the last Parameter of th
Vlookup as 'FALSE' this will then lookup the long description for you
codes but will produce '#NA' for codes that do not appear in you
lookup table.

If You need to replace the '#NA' with your error message, an IF formul
could be used, something along the lines of =IF(ISNA(D5),"Not A Vali
Code!",D5)

Someone may well be along soon with a more elegant solution :

--
dave_
-----------------------------------------------------------------------
dave_d's Profile: http://www.excelforum.com/member.php...fo&userid=1460
View this thread: http://www.excelforum.com/showthread.php?threadid=26371



All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com