Hi bala;

Originally Posted by
Balaryan
Note: It can be of lakh or million rows.
I don't know what "lakh" is.
Assuming that all the data starts at Row 1 (no headings)
Here's a macro that cycles through all the rows and highlights in red the cells that fail the tests.
1) To put this Macro into the workbook: Click Alt+F11 (opens Visual Basic Editor (VBE))
2) In Menus Insert->Module (Window should open with title similar to : "yourWorkbook.xls - Module1 (Code)"
3) Paste code into that module
4) Click Alt+F11 (returns to Excel)
5) Click Alt+F8 (opens macro window)
6) Select "Find_Good_Rows" and "Run"
If you would like to step through the macro 1 line at a time then
6) Select "Find_Good_Rows" and "Step Into"
7) Click F8, and each line will highlight before executing. You can bounce back and forth between Excel and VBE to verify what it is doing is correct.
8) Click F5 to finish running macro without stopping.
Bookmarks