HelpBook1.xlsx
This attachment is a representative sample of my workbook.

I’m wrestling with a tricky issue. My workbook helps me inventory quantities of chemical material. I will be filing a report with an agency that requires quantity data to be in coded groups. The sheet already has fields populated with =VLOOKUP set to translate a quantity entered manually into code. I also have columns containing the chemical component, physical state and density.

Here’s where it gets interesting.

The quantity I input requires recalculation based on the physical state of the inventory part. Did ya get that? In other words, the input varies depending on whether the material is solid, liquid, or gas. The purpose of this is to convert the quantity given to the appropriate units of measure. Density fields are also populated using =VLOOKUP.

If the physical state field reads "1," no change is required. If the physical state field reads “2” or “3”, the given quantity must be treated as a numerator and density a denominator. The result of the calculation then must be entered into the =VLOOKUP function which selects a quantity code instead of the given quantity.

Ideas, folks? Thanks in advance,
Sarah