#1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default find

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


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 5,441
Default find

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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default find

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

"J Bates" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default find

Thanks folks it works a treat.


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
Find Function Guy Lydig Excel Discussion (Misc queries) 2 May 19th 06 07:19 PM
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Code needed to find records from bottom up Andy Excel Discussion (Misc queries) 4 December 5th 05 03:27 AM
find a cells from a range of cell kelvintaycc Excel Worksheet Functions 2 April 2nd 05 07:20 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"