I record a lot of macros and can go into VB to manipulate them, but a programer I am not. I could really use some programming help right now.
I'm recording a macro to insert rows into a spreadsheet that is divided into sections. Section 1 runs from (A40:T52) with cell N53 being named SubA (it totals N40:N52). If I insert a row, SubA becomes cell N54 and inserting 2 rows would make it N55. I would like to insert individual rows as needed in the row above SubA (as well as SubB, SubC, SubD, and SubE). I can select SubA and I know the code to insert a row, but I can't figure out how to move up 1 cell without it referencing a specific cell (N52). That works for the first row I insert, but when I insert a second row, it will insert a blank row between data. I'm working on making this as user friendly as possible because the users won't be excel savy. Could anyone help me figure out what goes where the 3 ?'s are below in the lines of code? I would really appreciate the help.
Range("SubA").Select
???
Selection.EntireRow.Insert
Thank you,
Roy
Bookmarks