Hi guys,
Apologies is this is the classic newbie question, but I haven't been able to find a concrete answer.
I'm entirely new to Excel VBA and to programming in general. What I'm trying to do is select a subset of data from a large excel sheet that's roughly in this format:
Name Data One Data Two Data N ---------------------------------------------------- Person One x x x Person One x x x Person One x x x Person Two x x x Person Two x x x Person Three x x x
I will have a new sheet to deal withe every few days, but I won't know how many people will be listed on it or how many entries there will be for each person.
My end goal (for now...) is to take all the data for Person One and copy that to a new sheet (in the same workbook) called Person One, copy all the data for Person Two to a new sheet called Person Two, and so on.
If my rudimentary understanding of SQL is correct I would be able to use a command in the form of SELECT data FROM table WHERE Person = Person One.
However, I hacen't been able to find a simple way to do this in Excel. I can see there are ways that I could do it by using a loop to cycle through the row and note the point where the data change from 'Person One' to 'Person Two' and then define those ranges.
I also see that I can use the AutoFilter function to select the data that I want - I could filter the first column for unique records on a second sheet, then cycle through the names of each person in the AutoFilter setting.
It has also occurred to me I could use a loop to run through the entries in the first column and insert a blank row under each, so the table select function would select each chunk of data for each person.
Is there a better way to accomplish my end though? I would have thought this scenario was pretty common, but either it isn't or I'm searching on the wrong things.
Cheers!
Stephen