I am running Excel 2007 and writing code that 2003 users will run.
I think this one should be pretty simple, but I keep running into a brick wall . (Ya gotta love the emoticons on this forum; sometimes they get it just right!)
I need help with code that will AutoFill Down a value and add '1' to each cell in the four blank rows below cell E16
(Example: The value in cell E16 is C2000, I am trying to make the value of E17 value read C2001, E18 = C2002, etc.)
Here is the problem. The next time I run the report, it might have 6 blank cells inserted, so I cannot stipulate a range; that is why I am trying 'selection'. There is data in E21 that I do not want to lose. The following code selects E21 and I do not want that to happen:
I've been trying different code variations for almost 1-1/2 hours and am ready to admit that it could be another 1-1/2 before I figure this out on my own. Can anyone help me with the code?
Here is what I have so far (although I have modified it so much, it may not make sense:
Thank you,
Charles
I think this one should be pretty simple, but I keep running into a brick wall . (Ya gotta love the emoticons on this forum; sometimes they get it just right!)
I need help with code that will AutoFill Down a value and add '1' to each cell in the four blank rows below cell E16
(Example: The value in cell E16 is C2000, I am trying to make the value of E17 value read C2001, E18 = C2002, etc.)
Here is the problem. The next time I run the report, it might have 6 blank cells inserted, so I cannot stipulate a range; that is why I am trying 'selection'. There is data in E21 that I do not want to lose. The following code selects E21 and I do not want that to happen:
Code:
Range(Selection, Selection.End(xlDown)).Select
I've been trying different code variations for almost 1-1/2 hours and am ready to admit that it could be another 1-1/2 before I figure this out on my own. Can anyone help me with the code?
Here is what I have so far (although I have modified it so much, it may not make sense:
Code:
Selection.End(xlDown).Select
ActiveCell.Offset(RowOffset:=-1, ColumnOffset:=0).Select
Range(Selection, Selection.End(xlUp)).Select
Selection.AutoFill Destination:=(Selection)
Thank you,
Charles