Thank you very much for great help Mr. Sanram
I tested the code and typed 1 in M2 and everything is ok
Typed 2 and everything is ok
Cleared the cell M2 and everything as expected
But when typed 3 (or cleared the cell again when it is empty) .. I encountered an error 1004 at this line
As for the code I don't need to format the rows for B's group as I noticed that part of code
Rows for Group B would be just copy of main header rows ... and some changes in the cells that I refer to ..
Sorry for disturbing you ..
Bookmarks