![]() |
Inserting Rows after Input Box is used
Hello,
My latest issue is this: Let's say there is a list of numbers in cells A1:A100. These numbers are 1-10, in groups of 10. example: cells A1:A10 all contain 1, cells A11:A20 all contain 2, and on up to 10. I will need to insert 10 more rows according to whatever number is entered into an Input Box or the like. the user will click button to 'insert retest', then Input Box shows to ask what 'number' was retested, the user enters the number (say 5), then 10 rows are automatically inserted after the last number 5 in the range. sounded like easy navigation manipulation in my head...but i'm still new at this. Any help from the Masters is greatly appreciated. SF |
Inserting Rows after Input Box is used
Hi
have a look at the following. It should help. Note that every time new rows are inserted, the range to look for the number will change. Tony Sub ccc() req = InputBox("what number was retested", , 2) Range("a1:a100").Find(req).Offset(10, 0).Select Rows(ActiveCell.Row & ":" & ActiveCell.Row + 9).Select Selection.Insert Shift:=xlDown End Sub ----- foamfollower wrote: ----- Hello, My latest issue is this: Let's say there is a list of numbers in cells A1:A100. These numbers are 1-10, in groups of 10. example: cells A1:A10 all contain 1, cells A11:A20 all contain 2, and on up to 10. I will need to insert 10 more rows according to whatever number is entered into an Input Box or the like. the user will click button to 'insert retest', then Input Box shows to ask what 'number' was retested, the user enters the number (say 5), then 10 rows are automatically inserted after the last number 5 in the range. sounded like easy navigation manipulation in my head...but i'm still new at this. Any help from the Masters is greatly appreciated. SF |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com