Hi Guys, Genius' and Saviours...
Is there a quick and easy way to copy my code down the column, without having to manually edit it so much in each cell it has been copied into.
What I am trying to achieve, is for the cell to return a price from a table, in which the price returned is found in a corresponding column dependant upon a price group selection made in another cell..
So, In my code, the following applies:
B12 is a blank cell, where a product code will be entered by the user, the corresponding cells in that row will return results based on the product code entered, such as its description, price etc.
Cell C3 is a data validation List in which the user will select the price group, this determines the price group column that needs to be searched to return the correct price of that item.
In the below example, the only part of the code that I do want to update as the code is copied down is B12 - which will need to change to B13, B14, B15 etc as it is copied down, the rest needs to remain exactly as it is...
My Code:
=(IF(B12="","",IF(C3="PG00",VLOOKUP(B12,AshleyAnnTable,7,0),IF(C3="PG01",VLOOKUP(B12,AshleyAnnTable,8,0),IF(C3="PG04",VLOOKUP(B12,AshleyAnnTable,9,0),IF(C3="PG07",VLOOKUP(B12,AshleyAnnTable,10,0),IF(C3="PG09",VLOOKUP(B12,AshleyAnnTable,11,0),IF(C3="PG12",VLOOKUP(B12,AshleyAnnTable,12,0),IF(C3="PG15",VLOOKUP(B12,AshleyAnnTable,13,0),IF(C3="PG18",VLOOKUP(B12,AshleyAnnTable,14,0),IF(C3="PG20",VLOOKUP(B12,AshleyAnnTable,15,0),IF(C3="PG22",VLOOKUP(B12,AshleyAnnTable,16,0),IF(C3="PG25",VLOOKUP(B12,AshleyAnnTable,17,0),IF(C3="PG28",VLOOKUP(B12,AshleyAnnTable,18,0),IF(C3="PG31",VLOOKUP(B12,AshleyAnnTable,19,0),IF(C3="PG34",VLOOKUP(B12,AshleyAnnTable,20,0),IF(C3="PG37",VLOOKUP(B12,AshleyAnnTable,21,0),IF(C3="PGC",VLOOKUP(B12,AshleyAnnTable,22,0),IF(C3="PGD",VLOOKUP(B12,AshleyAnnTable,23,0),IF(C3="PGE",VLOOKUP(B12,AshleyAnnTable,24,0),IF(C3="PGF",VLOOKUP(B12,AshleyAnnTable,25,0),0)))))))))))))))))))))
My code looks quite long and messy, maybe there is a far simpler way of doing what I need - open to any suggestions...
Thanks in Advance...
Bookmarks