Index & Match Question

Joneye

Well-known Member
Joined
May 28, 2010
Messages
781
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
In "Table 1" is a list of data I need to allocate costing for from either location 1 or 2 depending on the Stored Code (ST1 & AB21), I need a little help, I think the index and match feature will work here, looking up column A&B against column F? to report back a cost etc...


<b>Excel 2003</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="font-weight: bold;;">TABLE 1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="border-bottom: 1px solid black;;">Below Tables Are cost against size for location</td><td style="text-align: right;border-bottom: 1px solid black;;"></td><td style="text-align: right;border-bottom: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style=";">Size</td><td style=";">Stored</td><td style=";">Units</td><td style="text-align: right;;"></td><td style="text-align: right;border-right: 1px solid black;;"></td><td style="font-weight: bold;border-top: 1px solid black;border-left: 1px solid black;;">Loaction 1</td><td style="font-weight: bold;border-top: 1px solid black;;">Size</td><td style="font-weight: bold;border-top: 1px solid black;border-right: 1px solid black;;">Cost</td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style=";">1.1</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">ST1</td><td style="text-align: right;;">1.1</td><td style="text-align: right;border-right: 1px solid black;;">£1.50</td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style=";">1.2</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">ST1</td><td style="text-align: right;;">1.2</td><td style="text-align: right;border-right: 1px solid black;;">£2.20</td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style=";">1.1</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">ST1</td><td style="text-align: right;;">1.4</td><td style="text-align: right;border-right: 1px solid black;;">£3.30</td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style=";">1.1</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">ST1</td><td style="text-align: right;;">1.6</td><td style="text-align: right;border-right: 1px solid black;;">£3.75</td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style=";">1.1</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-bottom: 1px solid black;border-left: 1px solid black;;">ST1</td><td style="text-align: right;border-bottom: 1px solid black;;">1.9</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;;">£4.25</td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style=";">1.1</td><td style=";">ST 1</td><td style=";"></td><td style=";"></td><td style=";"></td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style=";">1.9</td><td style=";">ST 2</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="font-weight: bold;border-top: 1px solid black;border-left: 1px solid black;;">Loaction 2</td><td style="font-weight: bold;border-top: 1px solid black;;">Size</td><td style="font-weight: bold;border-top: 1px solid black;border-right: 1px solid black;;">Cost</td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style=";">1.4</td><td style=";">ST 2</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">AB21</td><td style="text-align: right;;">1.1</td><td style="text-align: right;border-right: 1px solid black;;">£1.25</td></tr><tr ><td style="color: #161120;text-align: center;">11</td><td style=";">1.1</td><td style=";">AB21</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">AB21</td><td style="text-align: right;;">1.2</td><td style="text-align: right;border-right: 1px solid black;;">£1.50</td></tr><tr ><td style="color: #161120;text-align: center;">12</td><td style=";">1.4</td><td style=";">AB21</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">AB21</td><td style="text-align: right;;">1.4</td><td style="text-align: right;border-right: 1px solid black;;">£1.75</td></tr><tr ><td style="color: #161120;text-align: center;">13</td><td style=";">1.1</td><td style=";">AB21</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-left: 1px solid black;;">AB21</td><td style="text-align: right;;">1.6</td><td style="text-align: right;border-right: 1px solid black;;">£1.95</td></tr><tr ><td style="color: #161120;text-align: center;">14</td><td style=";">1.6</td><td style=";">AB21</td><td style=";"></td><td style=";"></td><td style="border-right: 1px solid black;;"></td><td style="border-bottom: 1px solid black;border-left: 1px solid black;;">AB21</td><td style="text-align: right;border-bottom: 1px solid black;;">1.9</td><td style="text-align: right;border-right: 1px solid black;border-bottom: 1px solid black;;">£2.00</td></tr><tr ><td style="color: #161120;text-align: center;">15</td><td style=";">1.6</td><td style=";">AB21</td><td style=";"></td><td style=";"></td><td style=";"></td><td style="text-align: right;border-top: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;;"></td><td style="text-align: right;border-top: 1px solid black;;"></td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A1</th><td style="text-align:left">TABLE 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F1</th><td style="text-align:left">Below Tables Are cost against size for location</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H1</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A2</th><td style="text-align:left">Size</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B2</th><td style="text-align:left">Stored</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C2</th><td style="text-align:left">Units</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E2</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F2</th><td style="text-align:left">Loaction 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G2</th><td style="text-align:left">Size</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H2</th><td style="text-align:left">Cost</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A3</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B3</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E3</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F3</th><td style="text-align:left">ST1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G3</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H3</th><td style="text-align:left">1.5</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A4</th><td style="text-align:left">1.2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B4</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C4</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D4</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E4</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F4</th><td style="text-align:left">ST1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G4</th><td style="text-align:left">1.2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H4</th><td style="text-align:left">2.2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A5</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B5</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C5</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D5</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E5</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F5</th><td style="text-align:left">ST1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G5</th><td style="text-align:left">1.4</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H5</th><td style="text-align:left">3.3</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A6</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B6</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C6</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D6</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E6</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F6</th><td style="text-align:left">ST1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G6</th><td style="text-align:left">1.6</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H6</th><td style="text-align:left">3.75</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A7</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B7</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C7</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D7</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E7</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F7</th><td style="text-align:left">ST1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G7</th><td style="text-align:left">1.9</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H7</th><td style="text-align:left">4.25</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A8</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B8</th><td style="text-align:left">ST 1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H8</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A9</th><td style="text-align:left">1.9</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B9</th><td style="text-align:left">ST 2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C9</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D9</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E9</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F9</th><td style="text-align:left">Loaction 2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G9</th><td style="text-align:left">Size</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H9</th><td style="text-align:left">Cost</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A10</th><td style="text-align:left">1.4</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B10</th><td style="text-align:left">ST 2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C10</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D10</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E10</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F10</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G10</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H10</th><td style="text-align:left">1.25</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A11</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B11</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C11</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D11</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E11</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F11</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G11</th><td style="text-align:left">1.2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H11</th><td style="text-align:left">1.5</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A12</th><td style="text-align:left">1.4</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B12</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E12</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F12</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G12</th><td style="text-align:left">1.4</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H12</th><td style="text-align:left">1.75</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A13</th><td style="text-align:left">1.1</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B13</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C13</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D13</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E13</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F13</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G13</th><td style="text-align:left">1.6</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H13</th><td style="text-align:left">1.95</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A14</th><td style="text-align:left">1.6</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B14</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C14</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D14</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E14</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F14</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G14</th><td style="text-align:left">1.9</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H14</th><td style="text-align:left">2</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A15</th><td style="text-align:left">1.6</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B15</th><td style="text-align:left">AB21</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C15</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">D15</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">E15</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">F15</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">G15</th><td style="text-align:left"></td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">H15</th><td style="text-align:left"></td></tr></tbody></table></td></tr></table><br />
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Popped it in cell C3 reports back as 0, any advice sir? I did think sumproduct myself also, do i need to {} either side with this formula?
 
Upvote 0
Could be because the stores begin with ST contain a space in column B, but don't in column F. They need to be identical.
 
Upvote 0
Problem solved many thanks for your help here.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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