Summarize Data from different Sheets via VBA

BIGTONE559

Active Member
Joined
Apr 20, 2011
Messages
336
I'm in need of Help/Direction with trying to summarize data in multiple worksheets. The idea is to create a "summarypage" of the data on the 5 sheets. The position of the date remains constant. The Color/Descrip/Qty are all variables. On the summary page the items are grouped by date and displayed beginning in cell "A6". . .

Please Help

%3E%3Ctable%20border=%221%22%20cellspacing=%220%22%20cellpadding=%220%22%20style=%22font-family:Calibri,Arial;%20font-size:11pt;%20background-color:

%3E%3Ctable%20border=%221%22%20cellspacing=%220%22%20cellpadding=%220%22%20style=%22font-family:Calibri,Arial;%20font-size:11pt;%20background-color:

%3E%3Ctable%20border=%221%22%20cellspacing=%220%22%20cellpadding=%220%22%20style=%22font-family:Calibri,Arial;%20font-size:11pt;%20background-color:

%3E%3Ctable%20border=%221%22%20cellspacing=%220%22%20cellpadding=%220%22%20style=%22font-family:Calibri,Arial;%20font-size:11pt;%20background-color:
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I apologize i was having issues posting photos. . .

<title>Excel Jeanie HTML</title>Summary

<table style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:78px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td> </td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td><td>F</td><td>G</td><td>H</td><td>I</td></tr><tr style="height:38px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">1</td><td colspan="9" style="text-align:center; ">Summary Page</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">2</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">3</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">4</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">5</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">6</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">7</td><td>Dates</td><td>Color</td><td>Description</td><td>QTY</td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">9</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">10</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">11</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">12</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">13</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">14</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">15</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">16</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">17</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">18</td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td></tr></tbody></table>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4


<title>Excel Jeanie HTML</title>Sheet2

<table style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td> </td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td><td> </td><td> </td><td>Date</td><td style="text-align:right; ">7/3/2011</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">9</td><td>Color</td><td>Descrip</td><td>Qty</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">10</td><td>Green</td><td>Pie</td><td style="text-align:right; ">12</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">11</td><td>Yellow</td><td>Cake</td><td style="text-align:right; ">13</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">12</td><td>Red</td><td>Ice Cream</td><td style="text-align:right; ">174</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">13</td><td>Brown</td><td>Twinkie</td><td style="text-align:right; ">19</td><td> </td></tr></tbody></table>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4

<title>Excel Jeanie HTML</title>Sheet3

<table style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td> </td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td><td> </td><td> </td><td> </td><td style="text-align:right; ">7/1/2011</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">9</td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">10</td><td>Green</td><td>Lollipop</td><td style="text-align:right; ">12</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">11</td><td>Yellow</td><td>Snickers</td><td style="text-align:right; ">13</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">12</td><td>Red</td><td>Cake</td><td style="text-align:right; ">174</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">13</td><td>Brown</td><td>Snickers</td><td style="text-align:right; ">19</td><td> </td></tr></tbody></table>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4

<title>Excel Jeanie HTML</title>Sheet4

<table style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"> <colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td> </td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td><td> </td><td> </td><td> </td><td style="text-align:right; ">7/2/2011</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">9</td><td> </td><td> </td><td> </td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">10</td><td>Green</td><td>Lollipop</td><td style="text-align:right; ">15</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">11</td><td>Yellow</td><td>Snickers</td><td style="text-align:right; ">21</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">12</td><td>Red</td><td>Cake</td><td style="text-align:right; ">485</td><td> </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">13</td><td>Brown</td><td>Snickers</td><td style="text-align:right; ">12</td><td> </td></tr></tbody></table>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
 
Upvote 0
I thought this may be possible but the following reasons make me Skeptical:


I thought if the document wasn't formatted correctly and the same on each and every page that you could not do Consolidation. But if it is possible i'd sure like some direction.

I'm including a copy of an additional parameter:

<html><head><title>Excel Jeanie HTML</title></head><body>
Excel Workbook
ABCD
87/2/2011
9
10GreenLollipopBig15
11YellowSnickersSmall21
12RedCakeMedium485
13BrownSnickersBig12
Sheet1


I'm trying to summarize by date first, then size (Big, Small, Medium). . . .
 
Upvote 0
OK.

Save the code below via vba(it takes less than 2 seconds to run):

===================================================

Sheets("summary").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("a1:g2000").Select
Selection.ClearContents

Sheets("Sheet2").Select
Range("A9:C9").Select
Selection.Copy
Sheets("summary").Select
Range("B7").Select
ActiveSheet.Paste
Selection.Font.Bold = False
Range("a7").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("A2").Select


Sheets("Sheet1").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste


Sheets("Sheet2").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste


Sheets("sheet3").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("sheet3").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste


Sheets("Sheet4").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet4").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste



Columns("D:D").EntireColumn.AutoFit
Rows("1:1").Select
Selection.Font.Bold = True


Sheets("Sheet2").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select

Sheets("Sheet3").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select

Sheets("Sheet4").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select

Sheets("Sheet1").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("summary").Select

Range("A7:D7").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Font.Bold = True



Range("A1").Select

End Sub

==============================================


Cheers!

'Rotimi
 
Upvote 0
Application.ScreenUpdating = False
Sheets("summary").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("a1:g2000").Select
Selection.ClearContents
Sheets("Sheet2").Select
Range("A9:C9").Select
Selection.Copy
Sheets("summary").Select
Range("B7").Select
ActiveSheet.Paste
Selection.Font.Bold = False
Range("a7").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("A2").Select

Sheets("Sheet1").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste

Sheets("Sheet2").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste

Sheets("sheet3").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("sheet3").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste

Sheets("Sheet4").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet4").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste

Columns("D:D").EntireColumn.AutoFit
Rows("1:1").Select
Selection.Font.Bold = True

Sheets("Sheet2").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet3").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet4").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet1").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("summary").Select
Range("A7:D7").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Font.Bold = True


Range("A7").Select
Selection.Cut Destination:=Range("E7")
Range("B7:E7").Select
Selection.Cut Destination:=Range("A7:D7")
Columns("D:D").Select
Selection.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Range("A1").Select

Range("A1").Select
Application.ScreenUpdating = True
 
Upvote 0
Hey Akinrontimi. . i tried out the code that you provided however, i was greeted with a run-time error 1004 and if refers to the following line 134 which has this code:

Selection.Insert Shift:=xlToRight

Can someone please take a look and see what the issue is?
 
Upvote 0
Hey Akinrontimi. . i tried out the code that you provided however, i was greeted with a run-time error 1004 and if refers to the following line 134 which has this code:

Selection.Insert Shift:=xlToRight

Can someone please take a look and see what the issue is?

Hi,

It worked fine from here.I followed the sample you provided.I took the data in sheet2(rows 8-13) as ideal and thus modified pasted into sheets1,3 and 4 before running the code:

===========================================

Application.ScreenUpdating = False
Sheets("summary").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("a1:g2000").Select
Selection.ClearContents
Sheets("Sheet2").Select
Range("A9:C9").Select
Selection.Copy
Sheets("summary").Select
Range("B7").Select
ActiveSheet.Paste
Selection.Font.Bold = False
Range("a7").Select
ActiveCell.FormulaR1C1 = "Dates"
Range("A2").Select
Sheets("Sheet1").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet1").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet2").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("sheet3").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("sheet3").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Sheets("Sheet4").Select
Range("D8").Select
Selection.Copy
Range("D10:D50").Select
ActiveSheet.Paste
Range("C8").Select
Application.CutCopyMode = False
Selection.Copy
Range("D9").Select
ActiveSheet.Paste
Sheets("Sheet4").Select
Columns("c:c").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a3:d50").Select
Selection.Copy
Sheets("summary").Select
Range("a20000").End(xlUp).Offset(1, 0).Select
ActiveSheet.Paste
Columns("D:D").EntireColumn.AutoFit
Rows("1:1").Select
Selection.Font.Bold = True
Sheets("Sheet2").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet3").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet4").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet1").Select
Range("A1:D50").Select
Selection.Cut Destination:=Range("A8:D57")
Range("D9:D60").Select
Selection.ClearContents
Range("A1").Select
Sheets("summary").Select
Range("A7:D7").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Font.Bold = True

Range("A7").Select
Selection.Cut Destination:=Range("E7")
Range("B7:E7").Select
Selection.Cut Destination:=Range("A7:D7")
Columns("D:D").Select
Selection.Cut
Columns("A:A").Select
Selection.Insert Shift:=xlToRight
Range("A1").Select
Range("A1").Select
Application.ScreenUpdating = True

end sub

========================================

Test and revert please.

Cheers!

Rotimi
 
Upvote 0
akinrotimi it says that the selection isn't valid. when it crashes i have marching ants around columns 1-8. Doesn't make much sense to me doesn't appear to be anything wrong with the code it just keeps giving me this error.
 
Upvote 0
Rotimi was i supposed to create a module for this code or paste it on the Summary Sheet. . . I was originally pasting the code in a module. and it didn't do anything. I then tried pasting it in the Summary page and it came up with a 400 error and stopped at page 2.

??????
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top