Hello,
I have a question about "if then" in excel vba
I've been looking all over the web for an answer or example and now matter what code I try I cannot get the right syntax.
I have a column named "code" which contains item codes and I want to test the value and place a particular value in another cell based on the comparison.
Allow me to illustrate.
Code
1AALIBOLTS10000
now, I want to be able to look at the first char of cell A1 and if it is a "1" then place "its a 1" into column b cell 1
then I need to check the second char of cell A1 and if it is a "C" then place "its a C" into column e cell 1
and so on and so on until I have compared all the values I wish to compare.
I hope this makes sense. I've been pulling my hair out trying to get this accomplished.
Any help would be greatly appreciated!
Thanks,
Bill
Configuration: Windows XP Firefox 2.0.0.11
The code for your question will look something like this.
|