+ Reply to Thread
Results 1 to 20 of 20

Auto filtering?

  1. #1
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196

    Auto filtering?

    I wonder if anyone can help I have a load of data about 200 people who have been on a diet. In colum A is there name in Comun B is the n of weeks they have been on the diet and column C is their starting weight. On a separate sheet I have week in column A and I want to have average start weight for that week in column B. Is there any formula I can put in to get it to search for the week (e.g. 1) in Column B of sheet 1 and then Average the starting masses for those people and put it into column B of Sheet 2?

    Any help welcome.


    Many thanks

    Jack

  2. #2
    Registered User
    Join Date
    06-11-2007
    Location
    Nonthaburee Province, Thailand
    MS-Off Ver
    MS Office 2003 to MS Office 2010
    Posts
    82
    To get the result quickly. Please attach the sample data file and the sample of result that you want.

    Thank you for your cooperative.
    N. Yauvasuta
    Power User Excel.

  3. #3
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    I have attached a sample file with a few bits of Data I have done the average in column C of sheet 2 to show what I would like calculated. Any help would be greatly appreciated

    Many Thanks


    Jack
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =SUMPRODUCT(--(Sheet1!$B$2:$B$19=ROW(A1))*(Sheet1!$C$2:$C$19))/COUNTIF(Sheet1!B:B,ROW(A1))
    Drag down as required

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    A PivotTable would be the most efficient way. I have created an example for you
    Attached Files Attached Files
    Last edited by royUK; 01-26-2008 at 09:14 AM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks to both of you for your help. When I click on the sample file for the pivot table it says page not found. Is that a problem with my end?

    I also would like to do somethingf similar with another sheet I have. Every month our children are given effort grades and I work out the average for each student. So in column A is the student Column B is the house they are attached to column C is the year they are in and column D is there average. One of the things people as me for is the best average for each year and each house is there a simple wa of doing this withouht having to sort them manually? I have attached a sample sheet.

    Sorry for all the questions it is amazing how much you can do with excel with some practice.

    Many thanks

    Jack
    Attached Files Attached Files

  7. #7
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I have attached the example now.

  9. #9
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks for that I have tried opening that site but my quicktime does not seem to work. Is there anywhere else I can look?

    Jack

  10. #10
    Forum Contributor
    Join Date
    07-10-2007
    Location
    Portland, OR USA
    Posts
    135
    I'm very much in the pivot table camp on this one.

  11. #11
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks for everyone's help. Is there a site which explains how to use pivot tables properly? I have played around with them but can never get them to quite do what I want.

    Again Many thanks


    Jack

  12. #12
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See link under pivots

    http://datapigtechnologies.com/ExcelMain.htm

    To get average change Pivot table field

    http://www.contextures.com/xlPivot05.html#Manual

    VBA Noob

  13. #13
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks. Is it therefore possible to use a pivot table to choose the best (Ie Lowest figure) from a range of data and then put the information attached to that data( e.g. the rest of the row) next to it? This is what I need to do for the grades example.

    Thanks again


    Jack

  14. #14
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    I have managed to produce a pivot table with the year and then the smallest average grade for that year. Is there any way of putting in the next cell the name of the person that grade corresponds to? I had a go at using lookup but could not get it to work and fear if two people have the same average it may cause problems. Any help would be more than appreciated.


    I have attached an example

    Many thanks

    Jack
    Attached Files Attached Files

  15. #15
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See attached

    VBA Noob
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks for that how did you get from mine to yours. I can add the name and year in the layout but it seems to add all the names how can I just get the one with the smallest average?

  17. #17
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Did you even watch the video's ??


    Just untick the names you don't require
    http://www.contextures.com/xlPivot04.html


    VBA Noob
    Attached Images Attached Images

  18. #18
    Forum Contributor
    Join Date
    07-10-2007
    Location
    Portland, OR USA
    Posts
    135
    Quote Originally Posted by jhelliar
    Many thanks for that how did you get from mine to yours. I can add the name and year in the layout but it seems to add all the names how can I just get the one with the smallest average?
    In your pivot table, double click the field "House".
    Advanced
    Top 10 Auto Show, "On"
    Show: "Bottom", "1"
    Using Field: "Min of Average"

  19. #19
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by jhelliar
    Many thanks for everyone's help. Is there a site which explains how to use pivot tables properly? I have played around with them but can never get them to quite do what I want.

    Again Many thanks


    Jack
    PivotTable examples & Tutorial at

    www.excel-it.com.

  20. #20
    Forum Contributor
    Join Date
    09-21-2007
    Posts
    196
    Many thanks for everyones help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1