R
rexie3
I'm writing a macro that will identify the plant's ID by looking at a cell
(A9).
My if statement has an error and I can't figure out what is wrong with it.
The error is somewhere here and it says I have a "compile error: syntax
error". I have 7 nested statements. Here's the formula:
ActiveCell.FormulaR1C1 = _
"=IF(A9="Shipto : 213455 LEAR CORPORATION-CARDL","LEAR PLANT:
MX02M037 - OSCAR",IF(A9="Shipto : 233783 LEAR CORP ESD","LEAR PLANT: MX02AZ79
- ARLIN",IF(A9="Shipto : 241885 LEAR CORPORATION PLANTA 160","LEAR PLANT:
MX02M037 - OSCAR",IF(A9="Shipto : 233782 LEAR CORPORATION ESD","LEAR PLANT:
MX02AZ79 - ARLIN",IF(A9="Shipto : 239129 LEAR PLANT 164","LEAR PLANT:
MX02AZ79 - ARLIN",IF(A9="Shipto: 213454 LEAR CORPORATION-CARDL","LEAR PLANT:
MX02PI42 - SAUL",IF(A9="Shipto : 229483 LEAR MXO2P142","LEAR PLANT: MX02PI42
- SAUL","0")))))))"
Also how do I get this process to go down the report looking for "Shipto :
2" (in the cell A#) and putting the plant ID in the cell F#? I have to run
this daily and some days the report is long and others they are not.
Thank you so much! I've been at this for a few days now.
(A9).
My if statement has an error and I can't figure out what is wrong with it.
The error is somewhere here and it says I have a "compile error: syntax
error". I have 7 nested statements. Here's the formula:
ActiveCell.FormulaR1C1 = _
"=IF(A9="Shipto : 213455 LEAR CORPORATION-CARDL","LEAR PLANT:
MX02M037 - OSCAR",IF(A9="Shipto : 233783 LEAR CORP ESD","LEAR PLANT: MX02AZ79
- ARLIN",IF(A9="Shipto : 241885 LEAR CORPORATION PLANTA 160","LEAR PLANT:
MX02M037 - OSCAR",IF(A9="Shipto : 233782 LEAR CORPORATION ESD","LEAR PLANT:
MX02AZ79 - ARLIN",IF(A9="Shipto : 239129 LEAR PLANT 164","LEAR PLANT:
MX02AZ79 - ARLIN",IF(A9="Shipto: 213454 LEAR CORPORATION-CARDL","LEAR PLANT:
MX02PI42 - SAUL",IF(A9="Shipto : 229483 LEAR MXO2P142","LEAR PLANT: MX02PI42
- SAUL","0")))))))"
Also how do I get this process to go down the report looking for "Shipto :
2" (in the cell A#) and putting the plant ID in the cell F#? I have to run
this daily and some days the report is long and others they are not.
Thank you so much! I've been at this for a few days now.