Thread
:
VBA Variables....
View Single Post
#
13
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
VBA Variables....
Glad you got it sorted out.
--
Don Guillett
SalesAid Software
"MarkHear1" wrote in message
oups.com...
On 15 Feb, 14:19, "Don Guillett" wrote:
It appears that you want to copy down to the last row in col B so I would
use
Sub filldowntoactivecell()
lrinB=cells(rows.count,"b").end(xlup).row
range("a2:a"&lrinB).filldown
End Sub
--
Don Guillett
SalesAid Software
"Don Guillett" wrote
in message
...
I also tested before I sent and it does copy a2 down to the ACTIVECELL
row. So, if you select row 10 in ANY column it will copy a2 down to
a10.
--
Don Guillett
SalesAid Software
"MarkHear1" wrote in message
roups.com...
On 15 Feb, 13:46, "Don Guillett" wrote:
Your problem appears to be that you are trying to offset a1 -1
column.
Try this to fill down from a2 to the activecell in column A
Sub filldowntoactivecell()
range("a2:a"&activecell.Row).filldown
End Sub
--
Don Guillett
SalesAid Software
"MarkHear1" wrote in
message
egroups.com...
I am still having problems with my varaibles. Below is the code i
have
written, can anybody offer any help as to why it is not working?
Dim BottomRow As Range
Set BottomRow = ActiveCell
Range("a2").Select
Dim Beginning As Range
Set Beginning = ActiveCell
Selection.AutoFill Destination:=Range(Beginning,
BottomRow.Offset(0,
-1)), Type:=xlFillDefault
Many Thanks,
Mark- Hide quoted text -
- Show quoted text -
I tested that code, and it doesn't copy the value in a2 down - do you
have any other suggestions?- Hide quoted text -
- Show quoted text -
That's correct.
And that code works a treat.
Thank you very much for your help.
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett