ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro reads cells with numbers . If given number is found , delets (https://www.excelbanter.com/excel-programming/434528-macro-reads-cells-numbers-if-given-number-found-delets.html)

Andrei

Macro reads cells with numbers . If given number is found , delets
 
Column B with many cells . Every cell has a number . If given number is found
, the macro should delete entire row

I want another macro which makes the opposite : if given number is found ,
keeps the row , but delets the rest

dan

Macro reads cells with numbers . If given number is found , delets
 
You want a clue or the answer?

Clue:

Create a looping macro which iterates over each cell from the last to the
first, checks the value of the cell and deletes the entire row if
appropriate. Use integer variables to track which row to delete.


"andrei" wrote:

Column B with many cells . Every cell has a number . If given number is found
, the macro should delete entire row

I want another macro which makes the opposite : if given number is found ,
keeps the row , but delets the rest


Andrei

Macro reads cells with numbers . If given number is found , de
 
Actually i want the answer . My Knowledge in VB is very low

"Dan" wrote:

You want a clue or the answer?

Clue:

Create a looping macro which iterates over each cell from the last to the
first, checks the value of the cell and deletes the entire row if
appropriate. Use integer variables to track which row to delete.


"andrei" wrote:

Column B with many cells . Every cell has a number . If given number is found
, the macro should delete entire row

I want another macro which makes the opposite : if given number is found ,
keeps the row , but delets the rest



All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com