jardenp
Active Member
- Joined
- May 12, 2009
- Messages
- 373
- Office Version
- 2019
- 2016
- 2013
- 2011
- 2010
- Platform
- Windows
I feel like this should be simple, but I don't know the language needed. In Excel 2010, I need VBA code to run according to the number of rows. Rows will always be grouped together at the top of the sheet, so there will be no blank rows in the middle of the data. Something like this:
create R
R = # of rows with with any populated fields
If R = 1, then run code1
If R = 2, then run code2
If R > 3, then run code3
(R will never = 0)
This problem arose from an AutoFill command running into trouble when there are not enough rows to satisfy a
type instruction.
Thanks!
PS. I see my user signature is out of date mentioning 2007 on XP. I'm running 2010 on Win 7.
create R
R = # of rows with with any populated fields
If R = 1, then run code1
If R = 2, then run code2
If R > 3, then run code3
(R will never = 0)
This problem arose from an AutoFill command running into trouble when there are not enough rows to satisfy a
Code:
[INDENT]Selection.AutoFill Destination:=Range("J3:L" & Range("A3").End(xlDown).Row)
[/INDENT]
Thanks!
PS. I see my user signature is out of date mentioning 2007 on XP. I'm running 2010 on Win 7.
Last edited: