ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shifting cells to consolidate record rows (https://www.excelbanter.com/excel-programming/426279-shifting-cells-consolidate-record-rows.html)

Flyer7

Shifting cells to consolidate record rows
 
Anyone have advice for me on shifting cells within an over 1000 record
database to consolidate all data in a single record per individual.
Now I have sometimes 7, sometimes 1 row per individual, each with some
accomplishment following name and address. These are members of a
sports organization. After pulling all accomplishments onto one
record I then want to print certificates with all accomplishments
listed on a single sheet. Sorry, I 'm not real experienced, but think
it would go something like this:

Dim counter As Integer
Range("AA2").Select
Do
Do
ActiveCell.Offset(-1, 0).Select
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Delete
counter = counter + 1
While Cells(counter, 3) = Cells(counter - 1, 3)
Loop Until ActiveCell = ""

I get a "Loop without Do" message...

I'm trying to key off name in col C which repeats that variable
number of times but is identical in each appearance. Any advice would
be appreciated Thanks

Don Guillett

Shifting cells to consolidate record rows
 
If desired, send your file to my address below with a snippet of this msg
and before/after examples.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Flyer7" wrote in message
...
Anyone have advice for me on shifting cells within an over 1000 record
database to consolidate all data in a single record per individual.
Now I have sometimes 7, sometimes 1 row per individual, each with some
accomplishment following name and address. These are members of a
sports organization. After pulling all accomplishments onto one
record I then want to print certificates with all accomplishments
listed on a single sheet. Sorry, I 'm not real experienced, but think
it would go something like this:

Dim counter As Integer
Range("AA2").Select
Do
Do
ActiveCell.Offset(-1, 0).Select
Selection.Insert Shift:=xlToRight
ActiveCell.Offset(1, 0).Select
Selection.EntireRow.Delete
counter = counter + 1
While Cells(counter, 3) = Cells(counter - 1, 3)
Loop Until ActiveCell = ""

I get a "Loop without Do" message...

I'm trying to key off name in col C which repeats that variable
number of times but is identical in each appearance. Any advice would
be appreciated Thanks



Flyer7

Shifting cells to consolidate record rows
 
I will do so, thank you

Don Guillett

Shifting cells to consolidate record rows
 
I sent a solution off list

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Flyer7" wrote in message
...
I will do so, thank you




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

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