I have to compare a phone number in a cell and return the "base" value from a 2nd table in the same workbook.
Numbers to compare:
Excel 2010<table style="background-color: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); border-collapse: collapse;" cellpadding="2.5px" rules="all"><colgroup><col style="background-color: rgb(218, 231, 245);" width="25px"><col><col></colgroup><thead><tr style="background-color: rgb(218, 231, 245); text-align: center; color: rgb(22, 17, 32);"><th>
</th><th>AD</th><th>AE</th></tr></thead><tbody><tr><td style="color: rgb(22, 17, 32); text-align: center;">1</td><td style="">DIDRange</td><td style="">DIDNumber</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">2</td><td style="text-align: right;">
</td><td style="">15126007128</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">3</td><td style="text-align: right;">
</td><td style="">15126007196</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">4</td><td style="text-align: right;">
</td><td style="">15126007140</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">5</td><td style="text-align: right;">
</td><td style="">1512600545</td></tr></tbody></table>
To this range and find the "base number" that the "range to - from" columns correspond to:
Excel 2010<table style="background-color: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); border-collapse: collapse;" cellpadding="2.5px" rules="all"><colgroup><col style="background-color: rgb(218, 231, 245);" width="25px"><col><col><col><col><col></colgroup><thead><tr style="background-color: rgb(218, 231, 245); text-align: center; color: rgb(22, 17, 32);"><th>
</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr><td style="color: rgb(22, 17, 32); text-align: center;">4</td><td style="">Range</td><td style="text-align: center;">Base Number</td><td style="text-align: center;"># of Lines</td><td style="text-align: center;">Range from</td><td style="text-align: center;">Range to</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">5</td><td style="">DID Range 1</td><td style="">15126005401</td><td style="text-align: right;">59</td><td style="">15126005401</td><td style="">15126005459</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">6</td><td style="">DID Range 2</td><td style="">15126007201</td><td style="text-align: right;">44</td><td style="">15126007201</td><td style="">15126007244</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">7</td><td style="">DID Range 3</td><td style="">15126007104</td><td style="text-align: right;">84</td><td style="">15126007104</td><td style="">15126007187</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">8</td><td style="">DID Range 4</td><td style="">15126007190</td><td style="text-align: right;">10</td><td style="">15126007190</td><td style="">15126007199</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">9</td><td style="">DID Range 5</td><td style="">15126007189</td><td style="text-align: right;">1</td><td style="">15126007189</td><td style="">15126007189</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">10</td><td style="">DID Range 6</td><td style="">15125270543</td><td style="text-align: right;">1</td><td style="">15125270543</td><td style="">15125270543</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">11</td><td style="">DID Range 7</td><td style="">15126005400</td><td style="text-align: right;">1</td><td style="">15126005400</td><td style="">15126005400</td></tr></tbody></table>
The end result is to insert the Base number into the "DIDRange" column. So if AE2 above is 15126007128, then the "base number" should be 15126007104 from B7 on the second table. As 15126007128 is within the base number 15126007104 and the last number in it's range 15126007187 from E7.
1st sheet name is dbimport (where number will be placed) and 2nd sheet is Begin Here (where the range is held).
I tried to do this with Excel formulas but couldn't get it done! I am using macros in this workbook to do further processing...so maybe a macro?
Hope someone can understand this and can help!
Numbers to compare:
Excel 2010<table style="background-color: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); border-collapse: collapse;" cellpadding="2.5px" rules="all"><colgroup><col style="background-color: rgb(218, 231, 245);" width="25px"><col><col></colgroup><thead><tr style="background-color: rgb(218, 231, 245); text-align: center; color: rgb(22, 17, 32);"><th>
</th><th>AD</th><th>AE</th></tr></thead><tbody><tr><td style="color: rgb(22, 17, 32); text-align: center;">1</td><td style="">DIDRange</td><td style="">DIDNumber</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">2</td><td style="text-align: right;">
</td><td style="">15126007128</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">3</td><td style="text-align: right;">
</td><td style="">15126007196</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">4</td><td style="text-align: right;">
</td><td style="">15126007140</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">5</td><td style="text-align: right;">
</td><td style="">1512600545</td></tr></tbody></table>
dbimport
To this range and find the "base number" that the "range to - from" columns correspond to:
Excel 2010<table style="background-color: rgb(255, 255, 255); border: 1px solid rgb(187, 187, 187); border-collapse: collapse;" cellpadding="2.5px" rules="all"><colgroup><col style="background-color: rgb(218, 231, 245);" width="25px"><col><col><col><col><col></colgroup><thead><tr style="background-color: rgb(218, 231, 245); text-align: center; color: rgb(22, 17, 32);"><th>
</th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr><td style="color: rgb(22, 17, 32); text-align: center;">4</td><td style="">Range</td><td style="text-align: center;">Base Number</td><td style="text-align: center;"># of Lines</td><td style="text-align: center;">Range from</td><td style="text-align: center;">Range to</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">5</td><td style="">DID Range 1</td><td style="">15126005401</td><td style="text-align: right;">59</td><td style="">15126005401</td><td style="">15126005459</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">6</td><td style="">DID Range 2</td><td style="">15126007201</td><td style="text-align: right;">44</td><td style="">15126007201</td><td style="">15126007244</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">7</td><td style="">DID Range 3</td><td style="">15126007104</td><td style="text-align: right;">84</td><td style="">15126007104</td><td style="">15126007187</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">8</td><td style="">DID Range 4</td><td style="">15126007190</td><td style="text-align: right;">10</td><td style="">15126007190</td><td style="">15126007199</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">9</td><td style="">DID Range 5</td><td style="">15126007189</td><td style="text-align: right;">1</td><td style="">15126007189</td><td style="">15126007189</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">10</td><td style="">DID Range 6</td><td style="">15125270543</td><td style="text-align: right;">1</td><td style="">15125270543</td><td style="">15125270543</td></tr><tr><td style="color: rgb(22, 17, 32); text-align: center;">11</td><td style="">DID Range 7</td><td style="">15126005400</td><td style="text-align: right;">1</td><td style="">15126005400</td><td style="">15126005400</td></tr></tbody></table>
Begin Here
The end result is to insert the Base number into the "DIDRange" column. So if AE2 above is 15126007128, then the "base number" should be 15126007104 from B7 on the second table. As 15126007128 is within the base number 15126007104 and the last number in it's range 15126007187 from E7.
1st sheet name is dbimport (where number will be placed) and 2nd sheet is Begin Here (where the range is held).
I tried to do this with Excel formulas but couldn't get it done! I am using macros in this workbook to do further processing...so maybe a macro?
Hope someone can understand this and can help!