Hi PritishD,
I hope I implemented your requirements correctly. There are constants (items in red below) that can be modified to allow you to put your data anywhere you want.
In the Sheet1 Module:
In Module1 (to replace your existing code):
To access a Sheet Module in VBA:
a. 'Left Click' on any cell in the Excel Spreadsheet.
b. ALT-F11 to get to VBA.
c. CTRL-R to get project explorer (if it isn't already showing).
d. 'Double Click' on the module you want to access in the 'Project Explorer'.
e. Insert code into the module if needed. 'Option Explicit' should only appear ONCE at the top of the module.
Lewis
Bookmarks