LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Autofill Based on a Changing Column

On Nov 27, 8:23*pm, OssieMac
wrote:
Hi Steve,

Hope I have interpreted your question correctly. Ensure that you back up
your data first just in case.

Note that a space and underscore at the end of a line is a line break in an
otherwise single line of code.

Sub CopyPasteFormula()

Dim rngActiveCell As Range
Dim lngRow As Long

Set rngActiveCell = ActiveCell

lngRow = rngActiveCell.Offset(0, -1) _
* .End(xlDown).Row

rngActiveCell.Copy _
* Destination:=Range(rngActiveCell, _
* Cells(lngRow, rngActiveCell.Column))

End Sub

--
Regards,

OssieMac


A big thank you.
The code worked great.

Cheers,

Steve
 
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
MS Excel - changing reference column value based on another column Dharmesh Patel[_2_] Excel Discussion (Misc queries) 2 October 12th 09 01:19 PM
Excel - changing column reference based on value of other column Dharmesh Patel Excel Discussion (Misc queries) 2 October 12th 09 01:18 PM
Automating to autofill column B based on column A entry GirlFridayCA Excel Discussion (Misc queries) 2 December 2nd 08 10:46 PM
Autofill 1 column with changing data and changing range cdclayton Excel Programming 0 August 5th 08 04:37 PM
Autofill Column D based on input in Column C Helen McClaine Excel Discussion (Misc queries) 1 April 5th 05 09:11 PM


All times are GMT +1. The time now is 12:35 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"