Two part question...

MickeyPvX

New Member
Joined
Feb 14, 2011
Messages
45
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...
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
The codes in the 2nd graph could be inputted into different cells and then you could use sumproduct to lookup the locations.
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top