Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MDC MDC is offline
external usenet poster
 
Posts: 2
Default selecting ranges

I am having trouble selecting a range. I want to select a
range beginnign with Column A and ending with the Last
column used. (there are some rows with no data, so i
couldn't simply use .End(xltoright))

Here is what i have:

Set rng = Range("IV" & lngRow & "").End(xlToLeft)
rng.Select
Range("A" & lngRow & "").Select

I can't seem to figure out how to combine the 2 last
statements to get what I am looking for.

Thanks,
MDC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default selecting ranges

Set rng = Range("IV" & lngRow & "").End(xlToLeft)
rng.Select
Range("A" & lngRow & "").Select


this selects a1:?1
Range(Cells(1, 1), Cells(1, "IV").End(xlToLeft)).Select
--
Don Guillett
SalesAid Software
Granite Shoals, TX

"MDC" wrote in message
...
I am having trouble selecting a range. I want to select a
range beginnign with Column A and ending with the Last
column used. (there are some rows with no data, so i
couldn't simply use .End(xltoright))

Here is what i have:

Set rng = Range("IV" & lngRow & "").End(xlToLeft)
rng.Select
Range("A" & lngRow & "").Select

I can't seem to figure out how to combine the 2 last
statements to get what I am looking for.

Thanks,
MDC



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
Selecting mutliple ranges Scott Graft Excel Worksheet Functions 4 June 13th 08 08:36 PM
Index and named ranges selecting difficulty Bruce Tharp Excel Worksheet Functions 7 June 19th 07 02:49 AM
Selecting Variable Data Ranges rc Excel Discussion (Misc queries) 2 May 18th 07 08:26 PM
selecting 2 ranges, 1 Worksheet, printing on 1 page PDF need help please Excel Discussion (Misc queries) 0 October 17th 06 09:03 PM
Trouble with selecting multiple ranges of data markag Excel Worksheet Functions 2 June 23rd 06 04:35 PM


All times are GMT +1. The time now is 08:21 PM.

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"