#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Repeat Data

Hi.. I'm completely stumped on this one..
I have a worksheet and its grouped by State and City and I have multiple
rows of data for each city to top it off.. State and City are in the same
coloumEg
Virgina
Richmond
Capitol 1
Zoo 2
Bars 10
Maryland
Baltimore
Capitol 1
Zoo 3
Bars 3
College 5
I would like the worksheet to be in
Virignia Richmod Capitol 1
Virgina Richmond Zoo 2
Virgina Richmond Bars 10
Maryland Baltimore Capitol 1
and so on..
Can someone help me..
Thx
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default Repeat Data

Making the following assumptions:
1 City/State are in Col A
2. Catagories in Col B
3 Qty in Col C
4 No blank rows now exist

Proceed as follows:
A. Insert a new Col A to hold the State
A Find last row in new col C ( dim this LastCatagory)
Loop:
B move up col C a cell at a time, incrementing a counter
If Cell is blank: ( you have arrived at the blank above the Cat group
C Copy the City( oCell.Offset(0,-1) and
paste it to:
Destination:=Range(oCell.Offset(1,-1),oCell.Offset(counter,-1)
D repeat C for the State only copy to new col A
E Delete the original City/State rows
Repeat Loop to top of sheet

Adjust above to fit your scenario
"Nagar" wrote:

Hi.. I'm completely stumped on this one..
I have a worksheet and its grouped by State and City and I have multiple
rows of data for each city to top it off.. State and City are in the same
coloumEg
Virgina
Richmond
Capitol 1
Zoo 2
Bars 10
Maryland
Baltimore
Capitol 1
Zoo 3
Bars 3
College 5
I would like the worksheet to be in
Virignia Richmod Capitol 1
Virgina Richmond Zoo 2
Virgina Richmond Bars 10
Maryland Baltimore Capitol 1
and so on..
Can someone help me..
Thx

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
Repeat row data RussG Excel Discussion (Misc queries) 4 January 27th 09 12:07 AM
Repeat data Sdbenn90 Excel Discussion (Misc queries) 6 December 24th 05 12:11 PM
Title Cut Off if Rows to Repeat & Columns to Repeat are Both Selec unibaby Excel Discussion (Misc queries) 2 August 24th 05 04:29 PM
Repeat Cell Data Pinky Excel Worksheet Functions 1 January 18th 05 05:38 PM
Repeat Paste of Data SiouxieQ Excel Worksheet Functions 0 November 19th 04 07:27 PM


All times are GMT +1. The time now is 01:48 AM.

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"