I’m Using excel to import data into the order system for my company. The most important value I need to import is the package code the code that defines which package need to be ordered). To define which Package code is needed we look at a Numeric value.
Lets say I have the following 3 package codes:
- ES000034 – used when numeric value = 9
- ES000035 – used when numeric value = > than 9 and < than 16
- ES000036 – used when numeric value = > than 16
and I want Excel to set the value for which package code needs to be used depending on the conditions mentioned above. Could someone please explain what the code will look like.
In a formula:
Something like this where A1 is the cell you’re checking:
=IF(A1=9,"ES000034",IF(AND(A1>=9, A1 <16),"ES000035",IF(A1>=16,"ES000036","")))In VBA, something like this used like
=PackageCode(A1):