Selecting data from column heading
I am trying to select column data based on columnn Heading
i.e date. I think I need to use VBA because I will also need to also bring over other data such as Name and Address. I therefore need some code that Looks for the date in row 3 once it finds the right date copies any data in the corresponding column over to another worksheet plus any data in column 1 and 2. There will be 52 columns relating to the weeks so. And therefore I will always be pulling off cols 1 and 2 plus another. Is there any experts out there that can help. Many thanks |
Selecting data from column heading
One idea to get you started
Sub finddateandcopy() ans = InputBox("which date") x = Rows(3).Find(ans).Column MsgBox x Range("a3:b21").Copy Sheets("destination").Range("a1") Range(Cells(3, x), Cells(21, x)).Copy 'etc End Sub -- Don Guillett SalesAid Software "VBA Novice" wrote in message ... I am trying to select column data based on columnn Heading i.e date. I think I need to use VBA because I will also need to also bring over other data such as Name and Address. I therefore need some code that Looks for the date in row 3 once it finds the right date copies any data in the corresponding column over to another worksheet plus any data in column 1 and 2. There will be 52 columns relating to the weeks so. And therefore I will always be pulling off cols 1 and 2 plus another. Is there any experts out there that can help. Many thanks |
All times are GMT +1. The time now is 06:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com