Here is what my Excel spreadsheet formatted as a table looks like:
<table>
<tr>
<th>Date</th>
<th>Month Name</th>
<th>Trading Day</th>
</tr>
<tr>
<td>12/1/2017</td>
<td>12</td>
<td>TRUE</td>
</tr>
<tr>
<td>12/2/2017</td>
<td>12</td>
<td>FALSE</td>
</tr>
<tr>
<td>12/3/2017</td>
<td>12</td>
<td>FALSE</td>
</tr>
<tr>
<td>12/4/2017</td>
<td>12</td>
<td>TRUE</td>
</tr>
<tr>
<td>1/1/2018</td>
<td>1</td>
<td>FALSE</td>
</tr>
<tr>
<td>1/2/2018</td>
<td>1</td>
<td>TRUE</td>
</tr>
<tr>
<td>1/3/2018</td>
<td>1</td>
<td>TRUE</td>
</tr>
</table>
I want to add a new column called "Monthly Trading Day Number" that will give the trading day number for the current month if "Trading Day" is equal to TRUE. So the counter will reset as you get to a new month. Like so:
<table>
<tr>
<th>Date</th>
<th>Month Name</th>
<th>Trading Day</th>
<th>Monthly Trading Day Number</th>
</tr>
<tr>
<td>12/1/2017</td>
<td>12</td>
<td>TRUE</td>
<td>1</td>
</tr>
<tr>
<td>12/2/2017</td>
<td>12</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>12/3/2017</td>
<td>12</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>12/4/2017</td>
<td>12</td>
<td>TRUE</td>
<td>2</td>
</tr>
<tr>
<td>1/1/2018</td>
<td>1</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>1/2/2018</td>
<td>1</td>
<td>TRUE</td>
<td>1</td>
</tr>
<tr>
<td>1/3/2018</td>
<td>1</td>
<td>TRUE</td>
<td>2</td>
</tr>
</table>
How do I do this?
<table>
<tr>
<th>Date</th>
<th>Month Name</th>
<th>Trading Day</th>
</tr>
<tr>
<td>12/1/2017</td>
<td>12</td>
<td>TRUE</td>
</tr>
<tr>
<td>12/2/2017</td>
<td>12</td>
<td>FALSE</td>
</tr>
<tr>
<td>12/3/2017</td>
<td>12</td>
<td>FALSE</td>
</tr>
<tr>
<td>12/4/2017</td>
<td>12</td>
<td>TRUE</td>
</tr>
<tr>
<td>1/1/2018</td>
<td>1</td>
<td>FALSE</td>
</tr>
<tr>
<td>1/2/2018</td>
<td>1</td>
<td>TRUE</td>
</tr>
<tr>
<td>1/3/2018</td>
<td>1</td>
<td>TRUE</td>
</tr>
</table>
I want to add a new column called "Monthly Trading Day Number" that will give the trading day number for the current month if "Trading Day" is equal to TRUE. So the counter will reset as you get to a new month. Like so:
<table>
<tr>
<th>Date</th>
<th>Month Name</th>
<th>Trading Day</th>
<th>Monthly Trading Day Number</th>
</tr>
<tr>
<td>12/1/2017</td>
<td>12</td>
<td>TRUE</td>
<td>1</td>
</tr>
<tr>
<td>12/2/2017</td>
<td>12</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>12/3/2017</td>
<td>12</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>12/4/2017</td>
<td>12</td>
<td>TRUE</td>
<td>2</td>
</tr>
<tr>
<td>1/1/2018</td>
<td>1</td>
<td>FALSE</td>
<td>-1</td>
</tr>
<tr>
<td>1/2/2018</td>
<td>1</td>
<td>TRUE</td>
<td>1</td>
</tr>
<tr>
<td>1/3/2018</td>
<td>1</td>
<td>TRUE</td>
<td>2</td>
</tr>
</table>
How do I do this?