#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Autofill

How can I get a formula keyed in cell E2 and then copy down to the last row
that has contents in a2. I've also got to copy and paste special values from
column E that has the formula back to column c and delete column E.

This is the formula I am using =(LEFT(C2,LEN(C2)-2)

Any ideas? I've tried numerous things but I can't get any of them to work..
--
Thanks a bunch!
rojobrown
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Autofill

rojobrown,

here's one way:

Sub test()
Dim lLastRow As Long

lLastRow = Range("A65535").End(xlUp).Row
With Range("E2:E" & lLastRow)
.FillDown
.Copy
End With
Range("C2:C" & lLastRow).PasteSpecial xlPasteValues
Range("E2:E" & lLastRow).ClearContents

End Sub


--
Hope that helps.

Vergel Adriano


"rojobrown" wrote:

How can I get a formula keyed in cell E2 and then copy down to the last row
that has contents in a2. I've also got to copy and paste special values from
column E that has the formula back to column c and delete column E.

This is the formula I am using =(LEFT(C2,LEN(C2)-2)

Any ideas? I've tried numerous things but I can't get any of them to work..
--
Thanks a bunch!
rojobrown

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Autofill

That did it. I am not good at this stuff. Thank you sooo much for your
help!!!
--
Thanks a bunch!
rojobrown


"Vergel Adriano" wrote:

rojobrown,

here's one way:

Sub test()
Dim lLastRow As Long

lLastRow = Range("A65535").End(xlUp).Row
With Range("E2:E" & lLastRow)
.FillDown
.Copy
End With
Range("C2:C" & lLastRow).PasteSpecial xlPasteValues
Range("E2:E" & lLastRow).ClearContents

End Sub


--
Hope that helps.

Vergel Adriano


"rojobrown" wrote:

How can I get a formula keyed in cell E2 and then copy down to the last row
that has contents in a2. I've also got to copy and paste special values from
column E that has the formula back to column c and delete column E.

This is the formula I am using =(LEFT(C2,LEN(C2)-2)

Any ideas? I've tried numerous things but I can't get any of them to work..
--
Thanks a bunch!
rojobrown

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
autofill scott Excel Worksheet Functions 2 September 10th 08 07:27 AM
Autofill with changes lbond Excel Programming 0 January 14th 06 07:29 PM
Autofill paulinoluciano Excel Worksheet Functions 8 December 28th 05 06:00 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


All times are GMT +1. The time now is 07:13 PM.

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

About Us

"It's about Microsoft Excel"