Sub Copy_By_Date() 'Clear Summary Sheet Row 10 through End Sheets("Summary"). Address Do 'Copy each Row where date is found to next empty Row on Summary sheet d. Tell us more about what you are trying to do and we'll see if we can help. The dates are all in column B on all worksheets, and start on row 10, if that matters.The general idea of the function I'm trying to create is that at the end of the day, a specific, single date can be entered into the search field (cell C7 on Summary worksheet) and all rows of data containing that date are populated below it.The source worksheets do not even have to be identical, just similar. At top left, tick the Grand Totals for Columns box. A new sheet is created listing the 9 amounts that make up this total. For example, suppose that you wish to add a further row to the worksheet for Company C. Calculate the new expense type as = B14*0.75 Copy the formula across to all columns including the Total column. Right click on pivot for menu: Select: Refresh Data. Expense Type 2a is now included but at the bottom of the list. Refresh Data automatically adjusted the data ranges you set up.In the tutorial you will amend the format of one source worksheet and see how the new format is reflected in the pivot table. The Pivot table displays monthly Revenue by company. To sort the rows correctly: Left click on the grey Row button in A4 to highlight column A. To check this: Right click for menu - Wizard - Back.I have a shared workbook that I created with 8 different worksheets that all have the same format.
Note that this is the reason why you were instructed NOT to include the 'Total' column of each worksheet when you set up the Data ranges.
These debugging techniques will help you troubleshoot "broken" code as well as understand code that is found in forums such as this one. Clear Contents 'Set my Date variable to value in C7 my Date = Sheets("Summary"). Is the code written and working but just not attached to the button? If the sheets are laid out so that the date you are looking for is in a specific column (e.g. Can you tell me something about the layout the sheets?
Using these debugging techniques can help you write/fix/learn VBA code. Range("C7") 'Set initial Paste Row nxt Rw = 10 'Loop through Sheets 1 - 8 For sht Num = 1 To 8 'Search Column b for date(s) With Sheets(sht Num). Find(my Date) If Not d Is Nothing Then first Address = d. A) and you want to copy the entire row each time the date is found in that column, then the code will be very straight forward: Search Sheet1! Another question: Is the goal to clear the Summary sheet and populate it with new data each time the button is clicked or is the new data being appended to bottom of the existing data? However, if you tell me that you want to replace existing data on an individual basis, here and there throughout the sheet, the level of complexity goes up considerably.
The code offered below assumes that the Summary sheet is the 9th sheet in the workbook and that you are copying data from Sheets 1-8. If you have attempted to write the code but it is not working, please click on the following line and read the instructions on how to post VBA code in this forum so that we can see what you have so far. No problem, but I have a couple of questions first.
BTW...since you said that your are "having trouble in VBA" you might want to review this tutorial. Address First you say you are: "having trouble in VBA getting this button to pull ALL entries from the date specified in c7..."Then you say you: "have no code attached to the command button at the moment."I'm confused. Please keep in mind that even though you said "I created with 8 different worksheets that all have the same format", we can't see your workbook from where we are sitting and therefore have no idea what that "format" looks like. Once Sheet1 has been exhausted, move on to Sheet2 and do it all again. However, if the the sheet is laid out such the date could be anywhere or if multiple rows need to be copied for each date then things get more complicated.