In your order form your have a columns for Material, Colour and Size - Material can be obtained from column C of your database and Size is in column D of your database, but there is nothing to give your the Colour information. In your example table above your have 125mm shown under Colour with a Size of 1, so your example is inconsistent.
I've noticed that you are using merged cells in your order form, so the formula that I gave you will not work. You will have to put this formula in B20:
and this one in F20:
G20 would have to be left empty as there is nowhere to get that data from, then you could put this in H20:
and in I20 you can have this:
and finally you can put this one in J20:
Notice that these formulae are very similar - the only thing that changes is the 3rd parameter within the VLOOKUP function, as this relates the column number where you want to get the data from.
VLOOKUP has up to 4 parameters, and allows you to retrieve data from a table. The first parameter is the lookup value - the value that you want to find in the table and in this case is the code that can be found in A20. The second parameter defines where the data can be found, and in this case it is columns A to F on Sheet1. The function works by searching through the left-most column of the table (column A of Sheet1) looking for a matching entry. If a match is found then it returns the corresponding value on the same row of the table in the column given by the third parameter. The final parameter defines the type of match which is looked for - a 0 (or FALSE) indicates an exact match.
Anyway, the formulae that I have given above can then be copied down on your order form to allow other items to be ordered.
Hope this helps.
Pete
Bookmarks