delete row if

shadow12345

Well-known Member
Joined
May 10, 2004
Messages
1,238
Hi I have the below table of data.

What I am trying to acheive is:
In each time stamp
count the number of different months with the same vol
if there is only one month in that time stamp put delete at the end of the row (Col G)

in the case of the below, G2 to G6 should be blank. everything else should say delete

*Col D is text and not a real date value




<table border = "1" cellspacing = "0" bordercolor="#999999">
<tr><td bgcolor="#C0C0C0"> </td>
<td align="center" bgcolor="#C0C0C0"><b>A</b></td><td align="center" bgcolor="#C0C0C0"><b>B</b></td><td align="center" bgcolor="#C0C0C0"><b>C</b></td><td align="center" bgcolor="#C0C0C0"><b>D</b></td><td align="center" bgcolor="#C0C0C0"><b>E</b></td><td align="center" bgcolor="#C0C0C0"><b>F</b></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>1</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Time </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">Type </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">contract </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">month </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">price </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "left" valign = "bottom" bgcolor ="#FFFFFF"><font color="#000000">vol </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>2</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:30:52 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>3</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:30:52 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>4</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:30:52 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Mar-12  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98560 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>5</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:30:52 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Mar-12  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98560 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>6</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:30:52 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Mar-12  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98560 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>7</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:19 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>8</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:19 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>9</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:18 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">2 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>10</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:19 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">2 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>11</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:17 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
<tr><td align = "center" bgcolor="#C0C0C0"><b>12</b></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">07:31:17 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">E </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">L  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">Sep-11  </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">98960 </font></td><td rowspan="1" colspan="1" width="192" height="30" align = "right" valign = "top" bgcolor ="#FFFFFF"><font color="#000000">1 </font></td></tr>
</table>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
in order to do math on a date it will need to be true dates and not text. You can format a date in the style
 
Upvote 0

Forum statistics

Threads
1,224,561
Messages
6,179,521
Members
452,923
Latest member
JackiG

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