find

  • Thread starter Thread starter J Bates
  • Start date Start date
J

J Bates

How can I setup a macro or use a function to find a column who's first cell
is called "Addresses" then move the whole column to sheet 2.
Is it possible?
Puzzled
 
J,

If there is only one cell with the word "Addresses" in it:

Sub MoveAddresses()
Cells.Find("Addresses").EntireColumn.Cut Worksheets("Sheet 2").Range("IV1").End(xlToLeft)(1,2)
End Sub

This will put the column into the column with the first free cell in row 1 of Sheet 2.

HTH,
Bernie
MS Excel MVP
 
Look in the vba help index for FIND

Sub findandcopycol()
Set mc = Rows(1).find("Addresses")
If Not mc Is Nothing Then Columns(mc.Column) _
..Copy Sheets("sheet4").Columns(1)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top