Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selectign a range

hi,

does anyone know, how to select range. for example, i am trying to
select values from first cell to the last cell in column B.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default selectign a range

Maxtm8,

Range(Range("B1"), Range("B65536").End(xlUp)).Select

John

Maxtm8 wrote:

hi,

does anyone know, how to select range. for example, i am trying to
select values from first cell to the last cell in column B.

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selectign a range

i found this one, and it works. thanks


Dim x As Long
x = Range("A" & Rows.Count).End(xlUp).Row
Range("a1:a" & x).Select



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default selectign a range

The rude and crude way

Dim lrow As Long

lrow = Cells(Rows.COUNT, "B").End(xlUp).Row
Range(Cells(1,2),Cells(lrow,2)).Select

But keep in mind that there are many things you can do with out selecting

For example
Range("A1").Select
Range("A1").Copy
Range("B1").Select
Range("B1").Paste
can be replaced with
Range("A1").Copy _
Destination:= Range("B1")

--
sb
"Maxtm8" wrote in message
...
hi,

does anyone know, how to select range. for example, i am trying to
select values from first cell to the last cell in column B.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
Cond. Format Data Bars of range based on values of another range alexmo Excel Worksheet Functions 4 January 16th 09 04:03 AM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
how to? set my range= my UDF argument (range vs. value in range) [advanced?] Keith R[_3_] Excel Programming 2 August 11th 03 05:55 PM


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