Big picture: I'm in sales, and the workbook I'm creating is for quotation purposes. I'd like to be able to enter the configured part number into one cell, then have the sheet spit out the expanded descriptions of what that part number represents. Our part numbers have a minimum of 9 characters, up to a maximum of 17 characters. Each position in that string of alphanumeric characters represents a specific thing (1-2 represent product code, 3-4 material code, 5 size, 6 series, and so on). Thanks to this site, I was able to figure out how to utilize the string function to extract the codes from their respective positions within the part numbers. I've also figured out how to put tables in a separate sheet within the same workbook and utilize the VLOOKUP function to have it spit out a description next to the codes. Works great!
There's only one problem... With the exception of positions 10 & 11, all of the codes which make up our part numbers, have only one possible definition. So for all but positions 10 & 11, I can simply have excel look and see what the code is for that position, and spit out the correct definition.
However, positions 10 & 11 make things difficult for me, as the characters in those positions have different definitions, based off the product code (positions 1 & 2 in the part number). The products I'm selling, are valves. So for example, if the product code (valve type) is a flush tank valve, then positions 10 & 11 represent the weld pad options. But if the product code (valve type) is a multiport or diverter type valve, then positions 10-11 represent the flow pattern.
So basically, when it gets to the description for positions 10-11, I need a formula which will tell excel to look at the product code in positions 1-2, and know that if that product code is any of our flush tank variety, then look in the "FT" table to find the description. If the product code is a diverter type valve, it needs to look in the "DP__MP" table for description. If the product code is any of our other type of valves, it needs to look in the "general" table to find a description.
I hope this makes sense the way I'm explaining it. I'd attach some pictures, but I can't figure out how. I found a few threads on this site which talked about multiple IF statements with VLOOKUP, but I couldn't get any of those solutions to work.
Here is the code I'm successfully using. Note that product, material, size, series, ends, seals, ball, and operator, are all tables with their respective codes and descriptions. Those lines work great! It's the code for C24 which I can't figure out.
=IFERROR(VLOOKUP(C18,PRODUCT,2,FALSE),"")
=IFERROR(VLOOKUP(C19,MATERIAL,2,FALSE),"")
=IFERROR(VLOOKUP(C20,SIZE,2,FALSE),"")
=IFERROR(VLOOKUP(C21,SERIES,2,FALSE),"")
=IFERROR(VLOOKUP(C22,ENDS,2,FALSE),"")
=IFERROR(VLOOKUP(C23,SEALS,2,FALSE),"")
*multiple IF statements, with VLOOKUP?
=IFERROR(VLOOKUP(C25,BALL,2,FALSE),"")
=IFERROR(VLOOKUP(C26,OPERATOR,2,FALSE),"")
Additional detail on the multiple IF statements, is as follows:
When looking to fill in the descriptions for positions 10-11 in my part numbers, if the product code is DI, DC, DD, DP, MP or MI, then VLOOKUP needs to reference table "DP__MI" for the description. If the product code is AF, FD, FT, FI or FC, then VLOOKUP needs to reference table "FT" for the description. If the product code is anything else (AN, CN, CP, SP, SD, TI, IM, FR, PV, CS, CT, SI), then VLOOKUP needs to reference the table "general" for descriptions.
There's only one problem... With the exception of positions 10 & 11, all of the codes which make up our part numbers, have only one possible definition. So for all but positions 10 & 11, I can simply have excel look and see what the code is for that position, and spit out the correct definition.
However, positions 10 & 11 make things difficult for me, as the characters in those positions have different definitions, based off the product code (positions 1 & 2 in the part number). The products I'm selling, are valves. So for example, if the product code (valve type) is a flush tank valve, then positions 10 & 11 represent the weld pad options. But if the product code (valve type) is a multiport or diverter type valve, then positions 10-11 represent the flow pattern.
So basically, when it gets to the description for positions 10-11, I need a formula which will tell excel to look at the product code in positions 1-2, and know that if that product code is any of our flush tank variety, then look in the "FT" table to find the description. If the product code is a diverter type valve, it needs to look in the "DP__MP" table for description. If the product code is any of our other type of valves, it needs to look in the "general" table to find a description.
I hope this makes sense the way I'm explaining it. I'd attach some pictures, but I can't figure out how. I found a few threads on this site which talked about multiple IF statements with VLOOKUP, but I couldn't get any of those solutions to work.
Here is the code I'm successfully using. Note that product, material, size, series, ends, seals, ball, and operator, are all tables with their respective codes and descriptions. Those lines work great! It's the code for C24 which I can't figure out.
=IFERROR(VLOOKUP(C18,PRODUCT,2,FALSE),"")
=IFERROR(VLOOKUP(C19,MATERIAL,2,FALSE),"")
=IFERROR(VLOOKUP(C20,SIZE,2,FALSE),"")
=IFERROR(VLOOKUP(C21,SERIES,2,FALSE),"")
=IFERROR(VLOOKUP(C22,ENDS,2,FALSE),"")
=IFERROR(VLOOKUP(C23,SEALS,2,FALSE),"")
*multiple IF statements, with VLOOKUP?
=IFERROR(VLOOKUP(C25,BALL,2,FALSE),"")
=IFERROR(VLOOKUP(C26,OPERATOR,2,FALSE),"")
Additional detail on the multiple IF statements, is as follows:
When looking to fill in the descriptions for positions 10-11 in my part numbers, if the product code is DI, DC, DD, DP, MP or MI, then VLOOKUP needs to reference table "DP__MI" for the description. If the product code is AF, FD, FT, FI or FC, then VLOOKUP needs to reference table "FT" for the description. If the product code is anything else (AN, CN, CP, SP, SD, TI, IM, FR, PV, CS, CT, SI), then VLOOKUP needs to reference the table "general" for descriptions.