PDA

View Full Version : Sleeper: VBA - "group by" function



frade
05-10-2005, 03:42 PM
Hello,:hi:

You can see my file named "group_by_values".

I don't know if it's possible to do the same query as Access.
I explain a little more with the data in sheet 1.

The goal is to obtain a new dataset such as the second sheet (sheet2).

Do you have an idea? what can I do using VBA?

Thanks

Fran?ois

mdmackillop
05-10-2005, 04:18 PM
Hi,
The advance filter should do this. The following code must be run from the sheet where the "Summary" is to appear.


Sub DoFilter()
Sheets("Sheet1").Range("A1:B55").AdvancedFilter Action:=xlFilterCopy, _
CopyToRange:=Range("A1"), Unique:=True
End Sub

frade
05-11-2005, 01:29 AM
Hi,


Ok, Thanks for your help. Now I would like to change this procedure because my columns (sheet1) are rather B and D (in place of A and B)
the goal is also to add automatically a new sheet with the summary (sheet4)

What can I change in your code?

Have a good day

Fran?ois

mdmackillop
05-11-2005, 02:21 PM
Hi Francois,
What changes have you tried?

frade
05-11-2005, 02:37 PM
Hi,

Please have a look to recent post. In this file, it would be usefull to create
a new sheet with a table like this

A "summary" (advanced filter to create a dataset like this)
Day - Average by day (AVG) - Standard deviation by day
1 value AVG1 - STD1
2 value AVG2 - STD2
3 value AVG3 - STD3


...Till Day 10

Fran?ois