Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Auto fill down

Nigel

Your macro excerpt worked like a charm. I was also able to tweek it to do a
couple of columns. I do have one question tho. How do i tweek it so it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Auto fill down


Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message ...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it to do a
couple of columns. I do have one question tho. How do i tweek it so it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Auto fill down

That didnt work. It just copies whatever is in that cell. doesnt continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it to

do a
couple of columns. I do have one question tho. How do i tweek it so

it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto fill down

since you are pasting a multicell range, what do you mean by filldown.
Filldown based on what?

--
Regards,
Tom Ogilvy

"Dominique Feteau" wrote in message
...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it to do

a
couple of columns. I do have one question tho. How do i tweek it so

it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Auto fill down

Hi Dominique

If there is a formula in B1 it will work
If there is a value then you get the same value.

the series.

what do you want to do


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message ...
That didnt work. It just copies whatever is in that cell. doesnt continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it to

do a
couple of columns. I do have one question tho. How do i tweek it so

it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Auto fill down

Ron

I have "Safety04-3000" in that cell as text. I want it to fill down the
series (e.g. Safety04-3001, Safety04-3002, etc.). but stop at the last row.

Niq
"Ron de Bruin" wrote in message
...
Hi Dominique

If there is a formula in B1 it will work
If there is a value then you get the same value.

the series.

what do you want to do


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
That didnt work. It just copies whatever is in that cell. doesnt

continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it

to
do a
couple of columns. I do have one question tho. How do i tweek it

so
it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Auto fill down

Try this then

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1").AutoFill Destination:=.Range("B1:B" & LastRow) _
, Type:=xlFillDefault
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message ...
Ron

I have "Safety04-3000" in that cell as text. I want it to fill down the
series (e.g. Safety04-3001, Safety04-3002, etc.). but stop at the last row.

Niq
"Ron de Bruin" wrote in message
...
Hi Dominique

If there is a formula in B1 it will work
If there is a value then you get the same value.

the series.

what do you want to do


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
That didnt work. It just copies whatever is in that cell. doesnt

continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message
...
Nigel

Your macro excerpt worked like a charm. I was also able to tweek it

to
do a
couple of columns. I do have one question tho. How do i tweek it

so
it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False












  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Auto fill down

thanx ron...i was close to that solution, but i set up my range incorrectly.

niq
"Ron de Bruin" wrote in message
...
Try this then

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1").AutoFill Destination:=.Range("B1:B" & LastRow) _
, Type:=xlFillDefault
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
Ron

I have "Safety04-3000" in that cell as text. I want it to fill down the
series (e.g. Safety04-3001, Safety04-3002, etc.). but stop at the last

row.

Niq
"Ron de Bruin" wrote in message
...
Hi Dominique

If there is a formula in B1 it will work
If there is a value then you get the same value.

the series.
what do you want to do


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
That didnt work. It just copies whatever is in that cell. doesnt

continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message
...
Nigel

Your macro excerpt worked like a charm. I was also able to

tweek it
to
do a
couple of columns. I do have one question tho. How do i tweek

it
so
it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count,

"A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False














  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto fill down

Did you try using the macro recorder?

--
Regards,
Tom Ogilvy

"Dominique Feteau" wrote in message
...
thanx ron...i was close to that solution, but i set up my range

incorrectly.

niq
"Ron de Bruin" wrote in message
...
Try this then

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1").AutoFill Destination:=.Range("B1:B" & LastRow) _
, Type:=xlFillDefault
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message

...
Ron

I have "Safety04-3000" in that cell as text. I want it to fill down

the
series (e.g. Safety04-3001, Safety04-3002, etc.). but stop at the

last
row.

Niq
"Ron de Bruin" wrote in message
...
Hi Dominique

If there is a formula in B1 it will work
If there is a value then you get the same value.

the series.
what do you want to do


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message
...
That didnt work. It just copies whatever is in that cell. doesnt
continue
the series.


"Ron de Bruin" wrote in message
...

Try this

Sub test()
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(Rows.Count, "A").End(xlUp).Row
.Range("B1:B" & LastRow).FillDown
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dominique Feteau" wrote in message
...
Nigel

Your macro excerpt worked like a charm. I was also able to

tweek it
to
do a
couple of columns. I do have one question tho. How do i

tweek
it
so
it'll
do an autofill instead of just a copy and paste?

Thanks in advance
Niq

Copy of macro below:

Dim LastRow As Long
LastRow = Worksheets("Sheet1").Cells(Rows.Count,

"A").End(xlUp).Row
Range("B1").Copy
Range("B2:B" & LastRow).Select
ActiveSheet.Paste
Application.CutCopyMode = False
















Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
auto fill or auto search from a list or drop-down list??????? Joe H.[_2_] Excel Discussion (Misc queries) 9 August 29th 08 12:56 AM
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
using auto fill edit or fill handel fill handle or auto fill Excel Worksheet Functions 0 February 10th 06 07:01 PM
Auto Fill Jay Excel Discussion (Misc queries) 1 January 28th 06 07:46 PM
auto filter and auto fill stelios Excel Programming 0 January 7th 04 11:24 AM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"