ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copying Blocks of Cells (https://www.excelbanter.com/excel-discussion-misc-queries/222877-copying-blocks-cells.html)

[email protected]

Copying Blocks of Cells
 
Hi all,

I need some code to automate a laborious process that has to be done
every month to prepare the data for input as a text file into a
databse.

Here's the deal.....

I have a spreadsheet that has about 100 columns, and several hundred
rows.

Column 1 contains dates, sequenced by month. The rest contain numbers
(Production data)

Row 1 contains well names, with row 3 having the production data for
that month, per well.

What I need to do is copy and paste the info into another spreadsheet,
but it has to be separated by month, and be copied in blocks of 10
columns.

Very roughly the data starts off looking a bit like this (I've reduced
it to just a few of the columns for clarity and hope the formatting
holds in this message).....

Date Well1 Well2 Well3
Well4 ....Welln
Jan-08 0 20 30
40 .....
Feb-08 20 30 30 50
Mar-08
and needs to look like this.....

Jan 08
Well1 Well2
0 20
Well3 Well4
30 40
Feb-08
Well1 Well2
20 30
Well3 Well4
30 40

and so on down to the last date in column A.

I hope this is clear enough and that someone out there can help!

Many thanks in advance,

Phil

Simon Lloyd[_111_]

Copying Blocks of Cells
 

I'm confused with your explanation of what you have in columns and
rows?, do you meant that every block of 4 rows is a separate date and
data?, can you explain any better?

If not you can join the forum below for free where you can add a
workbook to your post so we can see your structure and help you with it
better, if you do join make sure you post in this thread (link shown
below) so that folk who have been following it or helping can still
continue to do so.

;253455 Wrote:
Hi all,

I need some code to automate a laborious process that has to be done
every month to prepare the data for input as a text file into a
databse.

Here's the deal.....

I have a spreadsheet that has about 100 columns, and several hundred
rows.

Column 1 contains dates, sequenced by month. The rest contain numbers
(Production data)

Row 1 contains well names, with row 3 having the production data for
that month, per well.

What I need to do is copy and paste the info into another spreadsheet,
but it has to be separated by month, and be copied in blocks of 10
columns.

Very roughly the data starts off looking a bit like this (I've reduced
it to just a few of the columns for clarity and hope the formatting
holds in this message).....

Date Well1 Well2 Well3
Well4 ....Welln
Jan-08 0 20 30
40 .....
Feb-08 20 30 30 50
Mar-08
and needs to look like this.....

Jan 08
Well1 Well2
0 20
Well3 Well4
30 40
Feb-08
Well1 Well2
20 30
Well3 Well4
30 40

and so on down to the last date in column A.

I hope this is clear enough and that someone out there can help!

Many thanks in advance,

Phil



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (
http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=70769



All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com