I'm a novice in Excel VBA. Currently, I have imported a bunch of data into Excel. Is it possible to compare the value of current row and the next row? If there is same value occurred in column A, compare column B and the row with larger value in column B will be selected and another row will be deleted. I need some help or suggestion! Thanks!
Example: row A11: 397 B11:-57.6 will be deleted. The data is in this form:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;"> A B
11 397 -57.6
12 397 -57.3
13 270 -55
</code>
Example: row A11: 397 B11:-57.6 will be deleted. The data is in this form:
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; white-space: inherit;"> A B
11 397 -57.6
12 397 -57.3
13 270 -55
</code>