Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Select Coloumn Range based on cell value

I want macro that when I put any word from "A" to "Z" in Range("A1")
it should select that coloumn range from row 1 to down. For example
if I put "H" in Range("A1") and by pressing button macro should select
coloumn "H" range from row 1 to down. Please can any one help.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Select Coloumn Range based on cell value

Here is some code that you can attach to your button...

Sub Test
dim rng as range

on error resume next
set rng = range(cells(1, Range("A1").value), _
cells(rows.count, range("A1").value).end(xlup))
on error goto 0

if not rng is nothing then rng.select
end sub

--
HTH...

Jim Thomlinson


"K" wrote:

I want macro that when I put any word from "A" to "Z" in Range("A1")
it should select that coloumn range from row 1 to down. For example
if I put "H" in Range("A1") and by pressing button macro should select
coloumn "H" range from row 1 to down. Please can any one help.
Thanks

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
Select a coloumn or row in a Pivot table Darby Excel Discussion (Misc queries) 1 July 24th 08 03:12 AM
how can I select a range of cells based on a value of a cell? grigoras victor Excel Discussion (Misc queries) 1 June 26th 06 04:55 PM
Select cell from range based on input in excel xp dingy101 Excel Discussion (Misc queries) 3 November 20th 05 12:05 AM
Macro to select range based on cell not being blank neb[_5_] Excel Programming 0 July 20th 05 06:04 PM
Select a range of columns based on active cell Tom Ogilvy Excel Programming 0 November 10th 03 05:09 PM


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