Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Code Problem to end of column

Ric,

Column D is empty, so base your range on a filled in column, like C. And there is no need to
select....

Columns("D:D").Insert Shift:=xlToRight
Range("D1", Range("C65536").End(xlUp)(1, 2)).FormulaR1C1 _
= "=RC[-1]*100"

HTH,
Bernie
MS Excel MVP


"Rick" wrote in message
...
Below is my code that is intended to stop at the end of column D. As you can
see by the results below, the formula continues past the last row. Can
someone help determine where I am going wrong?
Ric

Columns("D:D").Select
Selection.Insert Shift:=xlToRight
ActiveCell.End(xlUp).Select
Range("D1", Range("D1").End(xlDown)).Select
'With Range("D1", Range("D1").End(xlDown)).Select
Selection.FormulaR1C1 = "=RC[-1]*100"
'End With

001102109480000558960 21061207 0000007353 0000735300
001102109480000558962 21061207 0000000295 0000029501
001102109480000558963 21061207 0000000128 0000012817
001102109480000558964 21061207 0000000102 0000010211
001102109480000558965 21061207 0000000350 0000035006
0000000000
0000000000
0000000000
0000000000



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 column from data (code) in column next to it Matt Excel Worksheet Functions 4 April 24th 09 06:17 PM
CODE PROBLEM N.F[_2_] Excel Discussion (Misc queries) 2 June 15th 07 08:07 PM
Help with code problem Les Stout[_2_] Excel Programming 0 October 17th 06 10:01 AM
Code problem Patrick Simonds Excel Programming 1 October 16th 05 12:03 AM
vba code problem Steve Excel Programming 3 November 26th 03 10:51 AM


All times are GMT +1. The time now is 11:28 AM.

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"