Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Making a macro with random placement.

I get a report each week. where the data will not be in order and you can not filter by name
Example
Jellybeans Early10Days Early6-10Days Early1-5Days Early/Late0Days Late1-5Days Late6-10Days Late10Days EarlyTotal
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat
Soap Early10Days Early6-10Days Early1-5Days Early/Late0Days Late1-5Days Late6-10Days Late10Days EarlyTotal
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat
Data Data Data Data Data Data Data Data Dat

So, Sometimes Jelly beans and the 5 rows of data are A16-I20. Next time the report is run Jellybeans is A34-I38. Is thier a way to macro what I need without selectin a certain row. Where Jellybean is the taget and it will copy 9 colums to the right and 4 rows below it
Thanks, DJ
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Making a macro with random placement.

Range("A:A").Find("Jellybeans").Offset(1,0).Resize (4,9).copy _
Destination:=Worksheets("Sheet2").Range("A1")

--
Regards,
Tom Ogilvy


"Duncan J" wrote in message
...
I get a report each week. where the data will not be in order and you can

not filter by name.
Example.
Jellybeans Early10Days Early6-10Days Early1-5Days Early/Late0Days

Late1-5Days Late6-10Days Late10Days EarlyTotals
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data
Soap Early10Days Early6-10Days Early1-5Days Early/Late0Days Late1-5Days

Late6-10Days Late10Days EarlyTotals
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data
Data Data Data Data

Data Data Data Data Data

So, Sometimes Jelly beans and the 5 rows of data are A16-I20. Next time

the report is run Jellybeans is A34-I38. Is thier a way to macro what I need
without selectin a certain row. Where Jellybean is the taget and it will
copy 9 colums to the right and 4 rows below it?
Thanks, DJ



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Making a macro with random placement.

Thanks Tom
You put me on the right track... This what worked
Range("A:A").Find("Jellybeans").Offset(0, 0).Resize(5, 14).Copy
Destination:=Worksheets("Sheet2").Range("A1")
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Making a macro with random placement.

Specification said:

it will copy 9 colums to the right and 4 rows below it


Didn't say to copy the row with Jellybeans. Unfortunately mindreading is
not a strength. <g

so you don't need Offset(0,0). That does nothing.

--
Regards,
Tom Ogilvy


"duncan_J" wrote in message
...
Thanks Tom,
You put me on the right track... This what worked.
Range("A:A").Find("Jellybeans").Offset(0, 0).Resize(5, 14).Copy _
Destination:=Worksheets("Sheet2").Range("A1")



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
Making random and unique selections from a list Babymech Excel Discussion (Misc queries) 2 January 27th 09 09:39 PM
VBA - Need macro to find optimal placement of rows in pairs Kasper Excel Discussion (Misc queries) 1 December 11th 08 09:22 AM
Macro to pull data with criterea for placement on a new sheet Trina Excel Discussion (Misc queries) 7 June 13th 08 11:00 PM
Cursor placement without Macro/VBA dwiba New Users to Excel 3 December 20th 07 01:27 PM
Random Placement whilst fitting constraints realmfighter Excel Worksheet Functions 2 May 29th 07 06:49 AM


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