Dear all,
i would like to assign the same number to different cells but following a certain order:
-Check B2:B250,000; if cells are bounded by zeros up and down; assign 1 to the adjacent cells in C, check the next cells bounded by zeros and assign 2 to the adjacent cells in C, continue in that order..otherwise leave as blank..see example below. how can I do this?
<table border="0" cellpadding="0" cellspacing="0" width="128"><col style="width:48pt" span="2" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt; width:48pt" align="right" height="20" width="64">0</td> <td class="xl63" style="border-left:none;width:48pt" width="64"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">22</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">55</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">39</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">40</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">12</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">41</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">90</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">25</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">9</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">12</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">34</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> </tbody></table>
i would like to assign the same number to different cells but following a certain order:
-Check B2:B250,000; if cells are bounded by zeros up and down; assign 1 to the adjacent cells in C, check the next cells bounded by zeros and assign 2 to the adjacent cells in C, continue in that order..otherwise leave as blank..see example below. how can I do this?
<table border="0" cellpadding="0" cellspacing="0" width="128"><col style="width:48pt" span="2" width="64"> <tbody><tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt; width:48pt" align="right" height="20" width="64">0</td> <td class="xl63" style="border-left:none;width:48pt" width="64"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">22</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">55</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">39</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">40</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">12</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">41</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">90</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">25</td> <td class="xl63" style="border-top:none;border-left:none" align="right">1</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">9</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">12</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">34</td> <td class="xl63" style="border-top:none;border-left:none" align="right">2</td> </tr> <tr style="height:15.0pt" height="20"> <td class="xl63" style="height:15.0pt;border-top:none" align="right" height="20">0</td> <td class="xl63" style="border-top:none;border-left:none"> </td> </tr> </tbody></table>