+ Reply to Thread
Results 1 to 20 of 20

Locate a max from range defined in other sheet in workbook

  1. #1
    Registered User
    Join Date
    06-04-2008
    Posts
    33

    Locate a max from range defined in other sheet in workbook

    Hi!
    Here my problem i would like to know if its possible (even if its not, is there anyway to make it slightly
    easier) to do:
    There we go:
    in my workbook i have 3 sheets named "time" "final" "push". in the sheet thats named "final" ihave in cells B2 and C2 2 values that correspond to a type interval (lets say 75-378)
    in the sheet "time" each row represents 1 sec, starting at one.
    what i would like to do is locate the interval defined by the 2 values on "final" sheet
    and find the min max and value in column S of the "time" sheet.
    i.e if B2 and c2 said 78 and 378 it would go on "time" sheet select the range of S78-S378 and find the mean, the max and the average
    and report them in sheet "final" in cells E2 F2 G2 respectively
    What would be optimal is that there was a way to perhaps loop so that it can do the same thing with the range defined by the values in B3 and C3.


    Thank you sooooo much!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try these:

    =MIN(INDEX(Time!S:S,Final!B2):INDEX(Time!S:S,Final!C2))

    =MAX(INDEX(Time!S:S,Final!B2):INDEX(Time!S:S,Final!C2))

    =AVERAGE(INDEX(Time!S:S,Final!B2):INDEX(Time!S:S,Final!C2))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    sorry my skills are really limited
    is that all i should copy in the module?

  4. #4
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    i think i get it let me try

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    These are formulas that you would place directly in the respective cells where you want the results to appear...E2, F2, G2.

    This is not VBA code so no modules needed.

  6. #6
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    hey ,
    its not working it returns 0 all the way down

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Are you sure you have data in sheet "Time" column S within a range defined by the values in B2 and C2 of sheet "final"?

    Are the values in column S really Numbers? Select column S and go to Data|Text to Columns and just click Finish? Does that fix it?

  8. #8
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    it actually gives me an error message about circular reference?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can't place the formula in the entire column, Time!S:S or in cells, Finall!B2 or in Final!C2

    If you still have problems... attach the document here.

  10. #10
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    maybe something alon the lines of
    =MIN((time!(S(INDEX(Final!B2:C2,1,1):S(INDEX(Final!B2:C2,1,2))

    this is giving me an error
    would this look for the min in the sheet "time" (S number in cell B2:S number in cell C2)?

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Where exactly are you entering your formulas.

    The formulas I gave you should work (unless your putting them somewhere in Column S of the Time sheet.

    I guess you don't want to post your sheet, as I have asked for it twice...?

  12. #12
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    i have also tried
    =MIN(Time!S(INDEX(Final!B2:C5,2,1)):S(INDEX(Final!B2:C5,2,2)))
    and i get #NAME in the cell...

  13. #13
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I am trying to help... but if you refuse to listen or reply to the specific questions that I ask in order to diagnose the problem then I can't help... so I am dropping this and not wasting my time anymore.... sorry.

  14. #14
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    hey sorry i didnt get that ill attach the workbook (if i can since ive been denied before)
    i enter the min in the e2,f2,g2 respectively
    also i renamed the time sheet to 'rawdata"

    edit: the workbook is 14.2 MB i think thats why i can't upload it...

  15. #15
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    the data text did not work
    and to correct my earlier post min is in E2
    max in F2
    avg in G2
    in the "final" sheet

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Since I am a nice guy and would like to try to help.. I will try once again...

    Try cutting down the amount of data in the workbook.. I don't think we need to see everything.

    Try also zipping it before you attach it.

  17. #17
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    ok give me 3 seconds

  18. #18
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    ok so there we goo i just made a new workbook because for some reason i dont have zip on this computer
    for example in final sheet the first range would be from 14 to 176 i would like for the function to go on "rawdata" sheet in column S and found the min from rown 14-176
    thanks once again for your patience
    Attached Files Attached Files

  19. #19
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached...

    Once you fill in all the rows in column S, you shouldn't get the #DIV/0 errors
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    06-04-2008
    Posts
    33
    ok i think its working i had other formulas in cells that were giving me a circular ref but i think i fixed it
    thank you very much once again

+ 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