Dear Excel specialists,
I have a short question, but first allow me to provide some additional context.
- I have a workbook, with several worksheets.
- People are required to fill in a fixed table with data. There is only one exception regarding the fixed table, people are allowed to add more rows in the table.
What I like to achieve is (pseudo code)![]()
- Look for data in all worksheets (fixed position: A8 - i8 horizontally, vertical is flexible), except the data in the Summary worksheet
- Preferably --> Copy all cells within that specific range (A8-i8) and stop when the first cell found that has no value (empty). My script looks for the text : "END"
- Copy all data within that specific area to the Summary sheet
- Put all collected data "under each other"
The problem with the current script is: '
- It copies total rows instead of an area, so it "wipes" all rows clean in the Summary worksheet. So it also cleans my "conditional formatting" planning table (that is/was positioned in J8- Z8 / and further down).
To summarize it all:
- I would like to copy an area instead of rows (because of cleaning the rest of my summary sheet).
Is this easy to achieve in a simple (easy to understand script/small script)?
Original Script:
For Each ws In Worksheets
If ws.Name <> Planning_Summary_Name Then
lr = ws.Cells.Find("*End*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
ws.Range("A8:I" & lr).Copy Sheets(Planning_Summary_Name).Range("D" & Rows.Count).End(xlUp).Offset(2, -3)
End If
Next ws
Thank you (in advance) very much for you support!
Please check the attachment I provided.
Bookmarks