I am trying to write code that will take the value in column H in the sample spreadsheet and use that value to determine the correct column to use in a lookup table (labeld Z in sample). Once the correct table is located, the value in column A is the range used to determine the value that goes in colum B. I have used do until, for next, for each next, if---then---elseif statements and the case select. All codes do the first three values correctly and then assumes all other values are true for the lookup table used for the third sample. . I have attached a sample workbook (note: in my original workbook there are formulas in column A & H that copies the given values from another worksheet to this one). Also, in column D I have given what the final results in column B should be.