Conditionally copying and creating rows in Excel
I'm putting together a report in Excel that has 10 different sections of data on it. Each section is a table of values and has the data for it being inserted into corresponding sheets that i will hide from the user's view. So I have 11 sheets, 10 for data and one for the final report.
Each data she开发者_如何学Goet will have the same number of columns each time but the amount of rows is variable. I need a way to conditionally create and copy rows in my report under each section that corresponds to the rows in the corresponding data sheet. I capture the Count with the data I insert so I know how many rows there are to begin with.
Here is an Example:
Sheet 1: Report
NAME DATE ADDRESS
Sheet 2:
Count: 3
NAME DATE ADDRESS
John 1/1/10 123 street
Mark 1/2/10 124 street
Dave 1/3/10 125 street
So I need to get that data from Sheet 2 into Sheet 1.
Check out the Advanced Filter functionality in Excel -- it may be an easy solution for what you want. In general, it gives you the ability to copy cells from another worksheet based on some criteria (boolean expressions supported).
More info on how to use it:
http://www.contextures.com/xladvfilter01.html
http://office.microsoft.com/en-us/excel-help/filter-by-using-advanced-criteria-HP005200178.aspx
精彩评论