please help to to select the new column

P

pol

I created a new column using the following formula

Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"),
0)).EntireColumn.Insert

But I to goto to first cell of that new column which are created newly with
the above formula

Please help
Pol
 
M

Mike H

Try,

Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"),
0)).EntireColumn.Insert
Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"), 0)).Offset(,
-1).Select

Mike
 
D

Daniel.C

Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"),
0)).EntireColumn.Insert
Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"), 0) - 1).Select
 
D

Dave Peterson

Check your earlier post.
I created a new column using the following formula

Cells(1, WorksheetFunction.Match("STOCK CODE", Rows("1:1"),
0)).EntireColumn.Insert

But I to goto to first cell of that new column which are created newly with
the above formula

Please help
Pol
 
D

Don Guillett

Or using find instead of MATCH

Sub insertcolandselectit()
mc = Rows("1:1").Find(What:="STOCK CODE", After:=Cells(1, 1), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, MatchCase:=False).Column
Columns(mc).Insert
Columns(mc + 1).Select
End Sub
 
Top