Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default How to create a variable selected range

Hi Ronald,

Am Sat, 20 Aug 2011 02:30:15 -0400 schrieb kittronald:

A B C D
1 ABC 1 2 3
2 BCD
3 CDE
4 DEF
5 EFG

In this case, B1:D1 would be filled down to row 5.


'Last used column
LCol = Cells(1, Columns.Count).End(xlToLeft).Column
'Last used Row
LRow = Cells(Rows.Count, 1).End(xlUp).Row
Range(Cells(1, 2), Cells(1, LCol)).AutoFill _
Destination:=Range(Cells(1, 2), Cells(LRow, LCol))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default How to create a variable selected range

Claus,

Vielen Dank !



- Ronald K.


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
vba: attach a variable name to a selected range Jayne22 Excel Programming 4 August 7th 08 10:54 PM
Naming variable range selected by cursor movement Merritt Sakata[_2_] Excel Programming 2 May 29th 08 10:56 AM
how to test whether selected variable is within defined range Abhinandan Excel Programming 0 May 26th 08 08:40 PM
how do i create a formula for selected range? Yin Excel Worksheet Functions 5 September 28th 05 04:55 AM
How do you get a Selected Range address into a variable? Jack Excel Programming 5 November 20th 03 04:09 AM


All times are GMT +1. The time now is 09:52 AM.

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"