By: Shamima Sultana

In reply to Rose.

Hello Rose,

You can copy the code from the article. Or if you want to copy the code from our Excel workbook then follow the steps below.
Open Visual Basic from the Developer tab.
Open the Sheet1 to get the code.

Regards
ExcelDemy