I'm working with some data on one part of a sheet, with a number of different locations. Each location has between 1 and 6 types of equipment, noted in another section of the sheet with the equipment codes:
<TABLE style="WIDTH: 253pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=336 border=0><COLGROUP><COL style="WIDTH: 14pt; mso-width-source: userset; mso-width-alt: 658" width=18><COL style="WIDTH: 239pt; mso-width-source: userset; mso-width-alt: 11629" width=318><TBODY><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 1pt solid; WIDTH: 14pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=18 height=34>Code1</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 239pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=318>Equip Name1</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Code2</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Equip Name2</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Code3</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Equip Name3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Etc...</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">etc...</TD></TR></TBODY></TABLE>
What I'm trying to do is input the equipment code for the specific location like so:
<TABLE style="WIDTH: 285pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=380 border=0><COLGROUP><COL style="WIDTH: 140pt; mso-width-source: userset; mso-width-alt: 6838" width=187><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><TBODY><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl68 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>LOCATION</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 145pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=193>EQUIPMENT</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name1</TD><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Code1, Code2, Code3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name2</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 145pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=193>Code3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name3</TD><TD class=xl68 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Code1, Code3</TD></TR></TBODY></TABLE>
And then in another sheet return the actual equipment name associated with the location, rather than the equipment code.
So the two parts to my question are, what would be the best way to input the equipment codes next to the location names (one cell or multiple?), and then how do I get the sheet to return the equipment names for specific locations? I'm thinking something with vlookup(), but having issues with the fact that each location has a different number of equipment types.
Hope that makes sense...
<TABLE style="WIDTH: 253pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=336 border=0><COLGROUP><COL style="WIDTH: 14pt; mso-width-source: userset; mso-width-alt: 658" width=18><COL style="WIDTH: 239pt; mso-width-source: userset; mso-width-alt: 11629" width=318><TBODY><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 1pt solid; WIDTH: 14pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=18 height=34>Code1</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 239pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=318>Equip Name1</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Code2</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Equip Name2</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Code3</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Equip Name3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl70 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 1pt solid; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" height=34>Etc...</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">etc...</TD></TR></TBODY></TABLE>
What I'm trying to do is input the equipment code for the specific location like so:
<TABLE style="WIDTH: 285pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=380 border=0><COLGROUP><COL style="WIDTH: 140pt; mso-width-source: userset; mso-width-alt: 6838" width=187><COL style="WIDTH: 145pt; mso-width-source: userset; mso-width-alt: 7058" width=193><TBODY><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl68 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>LOCATION</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext 0.5pt solid; BORDER-LEFT: windowtext; WIDTH: 145pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=193>EQUIPMENT</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name1</TD><TD class=xl71 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Code1, Code2, Code3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name2</TD><TD class=xl69 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; WIDTH: 145pt; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent" width=193>Code3</TD></TR><TR style="HEIGHT: 26.1pt; mso-height-source: userset" height=34><TD class=xl72 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 140pt; BORDER-BOTTOM: windowtext 0.5pt solid; HEIGHT: 26.1pt; BACKGROUND-COLOR: transparent" width=187 height=34>Loc Name3</TD><TD class=xl68 style="BORDER-RIGHT: windowtext 0.5pt solid; BORDER-TOP: windowtext; BORDER-LEFT: windowtext; BORDER-BOTTOM: windowtext 0.5pt solid; BACKGROUND-COLOR: transparent">Code1, Code3</TD></TR></TBODY></TABLE>
And then in another sheet return the actual equipment name associated with the location, rather than the equipment code.
So the two parts to my question are, what would be the best way to input the equipment codes next to the location names (one cell or multiple?), and then how do I get the sheet to return the equipment names for specific locations? I'm thinking something with vlookup(), but having issues with the fact that each location has a different number of equipment types.
Hope that makes sense...