Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: find

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

find
"J Bates" <newss[ at ]pittam.plus.com> 13.09.2006 12:41:12
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


Re: find
"Bernie Deitrick" <deitbe [ at ] consumer dot org> 13.09.2006 13:25:23
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


"J Bates" <newss[ at ]pittam.plus.com> wrote in message
news:4507fc5c$0$563$ed2619ec[ at ]ptn-nntp-reader03.plus.net...
[Quoted Text]
> 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
>


Re: find
"Don Guillett" <dguillett1[ at ]austin.rr.com> 13.09.2006 13:38:02
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
--
Don Guillett
SalesAid Software
dguillett1[ at ]austin.rr.com
"J Bates" <newss[ at ]pittam.plus.com> wrote in message
news:4507fc5c$0$563$ed2619ec[ at ]ptn-nntp-reader03.plus.net...
[Quoted Text]
> 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
>


Re: find
"J Bates" <newss[ at ]pittam.plus.com> 14.09.2006 09:29:30
Thanks folks it works a treat.


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net