Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wendy Clarkson
 
Posts: n/a
Default Copying portions of data

Is it possible to select a specific area of the worksheet using a find
command (the data changes every day) and copy just that portion onto a new
worksheet?

Thanks

Wendy


  #2   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Wendy,

If a verbal rule (or rules) can be devised to locate the area, then it is
very likely that someone could aaist you with code to automate this.


---
Regards,
Norman



"Wendy Clarkson" wrote in message
...
Is it possible to select a specific area of the worksheet using a find
command (the data changes every day) and copy just that portion onto a new
worksheet?

Thanks

Wendy




  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

I agree with Norman, but this may get you started:

Option Explicit
Sub testme03()
Dim FoundCell As Range
Dim DestCell As Range
Dim WhatToFind As String

WhatToFind = InputBox(Prompt:="What to find?")

If Trim(WhatToFind) = "" Then
Exit Sub
End If
With ActiveSheet.UsedRange
Set FoundCell = .Find(What:=WhatToFind, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
Lookat:=xlPart, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
End With

If FoundCell Is Nothing Then
MsgBox "Not Found!"
Else
Set DestCell = Worksheets("sheet2").Range("a1")
FoundCell.Resize(12, 30).Copy _
Destination:=DestCell
End If
End Sub

But be careful.

You'll want to specify all the .find options (xlwhole v. xlpart, matchcase,
etc).

And this routine finds something and pastes it to A1 of sheet2.
And it copies 12 rows by 30 columns!



Wendy Clarkson wrote:

Is it possible to select a specific area of the worksheet using a find
command (the data changes every day) and copy just that portion onto a new
worksheet?

Thanks

Wendy


--

Dave Peterson
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
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 05:15 PM
copying data from Excel spreadsheet to another DavidB Excel Discussion (Misc queries) 1 January 10th 05 11:26 PM
Automatic copying of data cells DaleM Excel Discussion (Misc queries) 2 December 29th 04 07:07 PM
Charting data ranges that change mikelee101 Charts and Charting in Excel 2 December 16th 04 11:07 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


All times are GMT +1. The time now is 02:00 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"