Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default create macro to move label type data to column data

I have address label data starting at B10 and then every 10 cells so c10,
d10, e10 etc all the way to B6270 i want to move the items in B11, 12 13 14
15 and 16, to column c,d,e,f,g,h so that i can export to Word, access etc
using column headings of Company name, add1 add2 etc.
How do i create a macro that does this. My first attempt did move the first
block B2 through B16 but did not move to b10 to start the next batch, so when
repeating the macro it went back to B2 and moved the now empty b3-b6 cells to
their "new" columns.
Also how will i delete rows 11 to 19 21-29 etc once the data is moved.
regards Jon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default create macro to move label type data to column data

You might want to reread you post and then repost with a clearer
description. You start out in your description moving across columns and
suddenly end up at B6270.

If I understand you correctly, your data is every 10 rows, but you say your
code processes B2 to B16.

anyway see if this works

Sub ReorganizeData()
for i = 10 to 6270 step 10
cells(i,2).Resize(10,1).copy
cells(i,2).PasteSpecial xlValues, transpose:=True
cells(i+1,2).Resize(9,1).ClearContents
Next
set rng = Range("B10:B7000").specialCells(xlBlanks)
rng.EntireRow.Delete
End Sub

Run this on a copy of your data to see if it does what you want.
--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in message
...
I have address label data starting at B10 and then every 10 cells so c10,
d10, e10 etc all the way to B6270 i want to move the items in B11, 12 13

14
15 and 16, to column c,d,e,f,g,h so that i can export to Word, access etc
using column headings of Company name, add1 add2 etc.
How do i create a macro that does this. My first attempt did move the

first
block B2 through B16 but did not move to b10 to start the next batch, so

when
repeating the macro it went back to B2 and moved the now empty b3-b6 cells

to
their "new" columns.
Also how will i delete rows 11 to 19 21-29 etc once the data is moved.
regards Jon



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default create macro to move label type data to column data

As Tom says this is not clear so:

i see from your response that i have not made things clear.

all my data is in column B....starting at row 10 there may be either 4,5 or
6 cells of data, which is why i restart the next label at 10.20.30 etc.

All i want to do is get these blocks into "name ad1 ad2" fields in access or
data that i can mail merge in word and i think to do that cell b11 needs to
move to c10, b12 needs to move to d10 etc and the the whole process start
again for the block starting in B20

regards Jon


"Tom Ogilvy" wrote:

You might want to reread you post and then repost with a clearer
description. You start out in your description moving across columns and
suddenly end up at B6270.

If I understand you correctly, your data is every 10 rows, but you say your
code processes B2 to B16.

anyway see if this works

Sub ReorganizeData()
for i = 10 to 6270 step 10
cells(i,2).Resize(10,1).copy
cells(i,2).PasteSpecial xlValues, transpose:=True
cells(i+1,2).Resize(9,1).ClearContents
Next
set rng = Range("B10:B7000").specialCells(xlBlanks)
rng.EntireRow.Delete
End Sub

Run this on a copy of your data to see if it does what you want.
--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in message
...
I have address label data starting at B10 and then every 10 cells so c10,
d10, e10 etc all the way to B6270 i want to move the items in B11, 12 13

14
15 and 16, to column c,d,e,f,g,h so that i can export to Word, access etc
using column headings of Company name, add1 add2 etc.
How do i create a macro that does this. My first attempt did move the

first
block B2 through B16 but did not move to b10 to start the next batch, so

when
repeating the macro it went back to B2 and moved the now empty b3-b6 cells

to
their "new" columns.
Also how will i delete rows 11 to 19 21-29 etc once the data is moved.
regards Jon




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default create macro to move label type data to column data

That's what the code offered does.

--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in message
...
As Tom says this is not clear so:

i see from your response that i have not made things clear.

all my data is in column B....starting at row 10 there may be either 4,5

or
6 cells of data, which is why i restart the next label at 10.20.30 etc.

All i want to do is get these blocks into "name ad1 ad2" fields in access

or
data that i can mail merge in word and i think to do that cell b11 needs

to
move to c10, b12 needs to move to d10 etc and the the whole process start
again for the block starting in B20

regards Jon


"Tom Ogilvy" wrote:

You might want to reread you post and then repost with a clearer
description. You start out in your description moving across columns

and
suddenly end up at B6270.

If I understand you correctly, your data is every 10 rows, but you say

your
code processes B2 to B16.

anyway see if this works

Sub ReorganizeData()
for i = 10 to 6270 step 10
cells(i,2).Resize(10,1).copy
cells(i,2).PasteSpecial xlValues, transpose:=True
cells(i+1,2).Resize(9,1).ClearContents
Next
set rng = Range("B10:B7000").specialCells(xlBlanks)
rng.EntireRow.Delete
End Sub

Run this on a copy of your data to see if it does what you want.
--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in

message
...
I have address label data starting at B10 and then every 10 cells so

c10,
d10, e10 etc all the way to B6270 i want to move the items in B11, 12

13
14
15 and 16, to column c,d,e,f,g,h so that i can export to Word, access

etc
using column headings of Company name, add1 add2 etc.
How do i create a macro that does this. My first attempt did move the

first
block B2 through B16 but did not move to b10 to start the next batch,

so
when
repeating the macro it went back to B2 and moved the now empty b3-b6

cells
to
their "new" columns.
Also how will i delete rows 11 to 19 21-29 etc once the data is moved.
regards Jon






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default create macro to move label type data to column data

Here is a revision:

Sub ReorganizeData()
For i = 10 To 6270 Step 10
Cells(i, 2).Resize(10, 1).Copy
Cells(i, 3).PasteSpecial xlValues, Transpose:=True
Cells(i + 1, 2).Resize(9, 1).ClearContents
Next
Set rng = Range("B10:B7000").SpecialCells(xlBlanks)
rng.EntireRow.Delete
Columns(2).Delete
End Sub

--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
That's what the code offered does.

--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in message
...
As Tom says this is not clear so:

i see from your response that i have not made things clear.

all my data is in column B....starting at row 10 there may be either 4,5

or
6 cells of data, which is why i restart the next label at 10.20.30 etc.

All i want to do is get these blocks into "name ad1 ad2" fields in

access
or
data that i can mail merge in word and i think to do that cell b11 needs

to
move to c10, b12 needs to move to d10 etc and the the whole process

start
again for the block starting in B20

regards Jon


"Tom Ogilvy" wrote:

You might want to reread you post and then repost with a clearer
description. You start out in your description moving across columns

and
suddenly end up at B6270.

If I understand you correctly, your data is every 10 rows, but you say

your
code processes B2 to B16.

anyway see if this works

Sub ReorganizeData()
for i = 10 to 6270 step 10
cells(i,2).Resize(10,1).copy
cells(i,2).PasteSpecial xlValues, transpose:=True
cells(i+1,2).Resize(9,1).ClearContents
Next
set rng = Range("B10:B7000").specialCells(xlBlanks)
rng.EntireRow.Delete
End Sub

Run this on a copy of your data to see if it does what you want.
--
Regards,
Tom Ogilvy

"JonathonWood9" wrote in

message
...
I have address label data starting at B10 and then every 10 cells so

c10,
d10, e10 etc all the way to B6270 i want to move the items in B11,

12
13
14
15 and 16, to column c,d,e,f,g,h so that i can export to Word,

access
etc
using column headings of Company name, add1 add2 etc.
How do i create a macro that does this. My first attempt did move

the
first
block B2 through B16 but did not move to b10 to start the next

batch,
so
when
repeating the macro it went back to B2 and moved the now empty b3-b6

cells
to
their "new" columns.
Also how will i delete rows 11 to 19 21-29 etc once the data is

moved.
regards Jon









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
data label disappears when I move it Tamara Charts and Charting in Excel 0 September 5th 08 12:14 AM
macro to move to minimum value in column of data g_noggle Excel Discussion (Misc queries) 2 November 8th 07 02:32 PM
Move data label cho Charts and Charting in Excel 1 January 31st 07 08:57 AM
Macro to move data to different column based on data in another co malycom Excel Discussion (Misc queries) 3 August 2nd 05 07:07 PM
Need a macro to move data from column into rows floss Excel Programming 4 June 5th 04 06:06 AM


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