Dear Friends,

I need a VBA code to lock non blank cells.

I have from range A1 till AH10000 data. I want VBA code that will find the last non blank cell in Column A (let's say this is cell A521) and lock range from A1 till AH521 and the rest range A522 till AH10000 keep unlock.

Thank you!