Select Coloumn Range based on cell value

  • Thread starter Thread starter K
  • Start date Start date
K

K

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
 
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
 
Back
Top