Question:
How to create a summary sheet in Excel?
Springy
2009-11-16 01:18:43 UTC
I would like to be able to copy entire rows of information from different worksheets in the same workbook to a summary sheet, based on whether one particular field is empty (column F). If column F has an entry, it would be ignored, if column F were empty, that row would be replicated.

Thank you in anticipation.
Three answers:
Steve
2009-11-16 11:43:39 UTC
Here is a basic macro that will do what you want with a little customization needed. This assumes a sheet called data and one called summary, you can copy this multiple times and change the sheet name to run it on each sheet. It also assumes your data starts in row 1 and you are pasting into the summary starting at row 1, you can change row_data = 1 and row_Summary = 1 to whatever number you would want. If you use it for multiple tabs you will need to reset row_data =1 before each group, do not reset row_summary or you will overwrite the previous tabs information.



Sub Macro1()



Dim row_data As Integer

Dim row_Summary As Integer



Sheets("Data").Select

row_data = 1

row_Summary = 1



Do While Range("A" & row_data).Value <> ""

If Range("F" & row_data).Value <> "" Then

row_data = row_data + 1

Else

Rows(row_data).Select

Selection.Copy

Sheets("Summary").Select

Range("A" & row_Summary).Select

ActiveSheet.Paste

row_Summary = row_Summary + 1

row_data = row_data + 1

Sheets("Data").Select

End If

Loop



End Sub



I hope this helps.



--------------------------------------------------------

Try This:

Sub Macro1()



Dim row_Archi As Integer

Dim row_Summary As Integer

Dim varSheet_name As String



row_data = 5

row_Summary = 5



'Copy from Here for Each Worksheet

Sheets("Archi").Select

varSheet_name = Activesheet.name

Sheets("Summary").Select

Range("A" & row_Summary).Value = varSheet_name

Sheets("Archi").Select

Do While Range("A" & row_data).Value <> ""

If Range("G" & row_data).Value = "" Then

Rows(row_data).Select

Selection.Copy

Sheets("Summary").Select



Range("A" & row_Summary).Select

ActiveSheet.Paste

row_Summary = row_Summary + 1

row_data = row_data + 1

Sheets("Archi").Select



Else

row_data = row_data + 1



End If

Loop

'Stop Copying Here





Sheets("Summary").Select

End Sub





This will put the sheet name in Column A of the row above the data for each tab. I added comments to show you what to copy for each of your worksheets. I flipped the if statement which may or may not correct the issue of copying data that you do not want (I don't see why this would happen).
hable
2016-10-15 03:43:02 UTC
image your aim audience who're very busy people and have basically one minute to take heed to you. Create a clean worksheet. form down what they ought to understand. ideally 5 - 7 bullets factors. For identify, positioned "government precis". It makes people experience significant and much less intense. Use 18 factors and above textual content fabric. For numbers, in simple terms use = function to tug them from the different sheets interior the comparable workbook. do no longer link workbooks, they're for idiots who basically make concerns worst. in case you're questioning of a few thing else, then it fairly is pivot tables you're talking approximately. Google for tutorials.
Bacalao
2009-11-16 01:27:38 UTC
Use Ctrl+Click


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...