ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Row and row above to new sheet (https://www.excelbanter.com/excel-programming/336524-copy-row-row-above-new-sheet.html)

Juan

Copy Row and row above to new sheet
 
Hi,
I have a sheet with subtotals sample data:
PART CPART JAN FEB MAR etc TOTAL
XYZ XYZ-1 500 1500 500
XYZ XYZ-1 100 2000 1000
600 3500 1500 5600 (This is subtotal row)
XYZZ XYZ-15 2000 1000 500
XYZZ XYZ-15 500 1000 1000
2500 2000 1500 6000 (This is subtotal row)
The end product I would like to get is:
PART CPART JAN FEB MAR etc TOTAL
XYZ XYZ-1 600 3500 1500 5600
XYZZ XYZ-15 2500 2000 1500 6000

Basically, need one row that shows the part,cpart,subtotals. Right now
Manually I would have to copy The Part,CPART then The subtotals, which if I
have alot of parts would be to time consuming.

So thinking need a few steps:
1. If Column A empty then copy as values that row and row above to new sheet.
2. In new sheet if Column A empty then move that row Up.

I hope I'm explaining this correctly. I know that I can delete a row if
column a is empty but need to figure out how to copy that row and row above
to new sheet.

Please advise any help. Really appreciate it
Juan

Dave Peterson

Copy Row and row above to new sheet
 
I'd remove the subtotals and then let excel put them in:

Data|subtotals (maybe twice???)

Then use the outlining symbols to hide the details.

===
It sounds like a perfect excuse to learn about pivottables (data|pivotable).

To read more about the pivottable stuff, you may want to look at some links:

Debra Dalgleish's pictures at Jon Peltier's site:
http://peltiertech.com/Excel/Pivots/pivottables.htm
And Debra's own site:
http://www.contextures.com/xlPivot01.html

John Walkenbach also has some at:
http://j-walk.com/ss/excel/files/general.htm
(look for Tony Gwynn's Hit Database)

Chip Pearson keeps Harald Staff's notes at:
http://www.cpearson.com/excel/pivots.htm

MS has some at (xl2000 and xl2002):
http://office.microsoft.com/downloads/2000/XCrtPiv.aspx
http://office.microsoft.com/assistan...lconPT101.aspx

Juan wrote:

Hi,
I have a sheet with subtotals sample data:
PART CPART JAN FEB MAR etc TOTAL
XYZ XYZ-1 500 1500 500
XYZ XYZ-1 100 2000 1000
600 3500 1500 5600 (This is subtotal row)
XYZZ XYZ-15 2000 1000 500
XYZZ XYZ-15 500 1000 1000
2500 2000 1500 6000 (This is subtotal row)
The end product I would like to get is:
PART CPART JAN FEB MAR etc TOTAL
XYZ XYZ-1 600 3500 1500 5600
XYZZ XYZ-15 2500 2000 1500 6000

Basically, need one row that shows the part,cpart,subtotals. Right now
Manually I would have to copy The Part,CPART then The subtotals, which if I
have alot of parts would be to time consuming.

So thinking need a few steps:
1. If Column A empty then copy as values that row and row above to new sheet.
2. In new sheet if Column A empty then move that row Up.

I hope I'm explaining this correctly. I know that I can delete a row if
column a is empty but need to figure out how to copy that row and row above
to new sheet.

Please advise any help. Really appreciate it
Juan


--

Dave Peterson


All times are GMT +1. The time now is 10:09 AM.

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