How to run excel sheet for specific number of input records

I have a excel which is currently processing near 2000 records.
I just want to fix the input records to 100.So let me know How this can done.
Means I give input for 100 records this will run for only 100 then stop the execution