Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Dragging values down a range using a colum to determine its length

Assumes formula is in C1 and B has the data.

Sub Auto_Fill()
Dim lRow As Long
With ActiveSheet
lRow = .Range("B" & Rows.Count).End(xlUp).Row
.Range("C1:C" & lRow).FillDown
End With
End Sub

Or if want to use selected cell then fill down.

Sub Auto_Fill()
Dim lRow As Long
With ActiveSheet
lRow = .Range("B" & Rows.Count).End(xlUp).Row
.Range(ActiveCell.Address & ":C" & lRow).FillDown
End With
End Sub



Gord Dibben MS Excel MVP

On Thu, 29 Apr 2010 06:29:02 -0700, AlexJarvis
wrote:

Is is possible to write a macro that drags values (or formuals) down a column
to the length of an adjacent column, like when you double click on little
square in the right corner of the box that indicates when a cell is selected?

For this question, I need the formula or data that is in the selected cell
to repeat for all cells in the adjacent column that have values. How do I do
this?


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
determine which values in a range of cells make up a given total Sheri Beri Excel Discussion (Misc queries) 2 January 19th 10 01:34 PM
Scatter PLotting using Data in third colum to determine range maugak Charts and Charting in Excel 2 July 29th 09 03:34 PM
Calculate Months to Determine Length of Service WilliamsDeLisle Excel Worksheet Functions 11 April 13th 09 09:51 PM
How to determine the arc length in Excel? Eric Excel Discussion (Misc queries) 5 September 16th 07 04:20 PM
lookup in colum a and compare values in colum b Boggled Excel User Excel Worksheet Functions 14 October 29th 04 06:38 PM


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