LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default selecting specific columns with data and put it in a new sheet

I tried to put something together but the folowing doesn't work. Any
idea's why???


Sub CommandButton2_Click()

On Error GoTo ErrorHandler

'PG_Begin is the name for the selection A1: A10 and on sheet called
assumption

Application.Goto Reference:="PG_Begin"
Row = ActiveCell.Row

While ActiveSheet.Cells(Row, 1).Value < ""
PG = ActiveSheet.Cells(Row, 1).Value


'the database called OLAP is activated and searced for
Sheets("olap").Select
Cells.Find(What:=PG, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate

ActiveCell.Select
ActiveCell.EntireColumn.Select

ActiveCell.EntireColumn.Copy
ActiveSheet.Paste (Sheets("Previous"). _
Range("IA1").End(xlToLeft).Offset(, 1))

Sheets("Assumption").Select

Row = Row + 1

Wend

ErrorHandler:
Application.ScreenUpdating = True
MsgBox (Err.Description)

End Sub

 
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
Selecting data from a specific column Charp Excel Discussion (Misc queries) 1 December 8th 09 05:29 PM
Selecting many specific columns for a chart porridge Charts and Charting in Excel 2 July 26th 06 07:49 PM
Selecting Specific Data within a Table Huge Peanuts Excel Worksheet Functions 0 February 21st 06 04:09 PM
Selecting Specific Data to copy/move to a new sheet ksp Excel Programming 0 December 6th 05 07:32 AM
Selecting date specific data from different spreadsheets Kim Excel Discussion (Misc queries) 1 September 26th 05 12:02 PM


All times are GMT +1. The time now is 09:56 PM.

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

About Us

"It's about Microsoft Excel"