+ Reply to Thread
Results 1 to 17 of 17

Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Getting Max & Min and Last Filled Row No from Multiple Sheets with the same Format from a specific Column.

    Dear Forum,

    I need to get the Max and the Min Values for a particular Lookup Value and also the Last Filled Row No from Multiple SHeets.

    Basically, to make comparisons from all the Sheets...under consideration....

    Warm Regards
    e4excel
    Last edited by e4excel; 02-14-2012 at 01:49 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Getting Max & Min and Last Filled Row No from Multiple Sheets with the same Forma

    Please attach a sample file so its easier to understand your data.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max & Min and Last Filled Row No from Multiple Sheets with the same Forma

    Hi Arlette,

    I was working on a Cricket File for our Company to maintain the Statistics..
    Now Each Match is stored in a seperate SHeet and the statistics are maintained only for one-side for our employees and not for the opponents.
    I need to get the below mentioned calculations from the DIfferent Sheets in the Total Sheet
    I need to get the Max & Min No of Runs Scored for our Employees from the three Sheets.
    Likewise I would also need to know the TOP_MOST Batting ORDER and the LOWER_MOST Batting Order...and also if I could get the Last Filled ROw No for another requirement.

    Hope this can be achieved using Formulas...

    Please find the attachment..

    Warm REgards
    e4excel
    Attached Files Attached Files
    Last edited by e4excel; 02-10-2012 at 07:20 AM.

  4. #4
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max & Min and Last Filled Row No from Multiple Sheets with the same Forma

    Dear Forum,

    Getting MAX from DIfferent SHeets is possible but getting the same MAX for a particular LOOKUP value + if the Numbers are also suffixed with asterisk (*) to indicate that the BATSMAN was not out..

    Complexities involved are not only due to the presence of Lookup Value but also due to the Data to be searched being on different rows..

    Warm REgards
    e4excel

  5. #5
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Lets say if We were to have a Helper column with only nos excuding the "*" then is it possible to get the Max-Min for a particular lookup where the data is stored at different locations.

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,647

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Could you please put the expected results to sheet Total? And show us how do they calculated?
    Quang PT

  7. #7
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Hi Bebo,

    For Max for the First Player
    Pritam Mohanty - Max would be by comparing the three sheets that is Match-1,..Match-3 and then the Max No of Runs scored in three matches he's played- would be 34,14,8 and so 34 should be the answer for Max and 8 for Min No of Runs..

    Same for the Wickets too, Example Player is Amit Malhotra where his Max No of Wickets would be to comapre the Column I from the 3 Sheets..
    1,2 and 4 so Max Outs - 4 and Min Outs -1..

    To know whats the Top-Most Order where a particular player has played and also the Lower-Most Order.
    Considering the example of Amit Malhotra - he's an allrounder( Pinch-Hitter) of sorts..
    He's Top-Most would be 4 as he batted at the Fourth Position in the Match-2 and Lower-Most Order would be 10 as he batted at the 10th Position twice.

    Also, if you could also help me with a generic answer to know the last filled row no incase the three sheets had different amounts of data..

    I am hoping for a Formula solution if its possible or else even a VBA would do..!!!!

    Warm REgards
    e4excel

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,647

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    How would you expect the "last filled row" be, in this case?

  9. #9
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Hi Bebo,

    If I am looking at the Column A from each sheet Match-1,2 and 3 then lets say the answer would be 13 as in this case all the sheets contains the same no of Data however, if there was any disparity in the no of filled rows in all the three sheets then i Need the Max filled Row no amongs the SHeet Nos.

    SO lets say- Sheet1- 10 Rows, Sheet-2 14 Rows and the Sheet-3 contains 6 Rows then the Last filled Row no would be 14.

    These Sheets are not going to remain just three but would keep on increasing..

    I think may be A defined Name for the SHeet Names would be a good idea..

    Warm REgards
    e4excel

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,647

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    See attachment to check whether it works or not.

    Last filled row:

    =MAX(MATCH("ZZZ",'Match-1'!A:A),MATCH("ZZZ",'Match-2'!A:A),MATCH("ZZZ",'Match-3'!A:A))

    I have no idea for using formula if there are lots of worksheets... may VBA is best solution!
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Dear Bebo,

    I am aware of this method of using the SUMIF and I liked the approach however is there a way of getting it done for Multiple SHeets and Different Rows , I can always add a helper column to just have Number without the asterisk..

    Your approach is indeed praiseworthy as You used the SUMIF to counter the different rows this can be iterated for different sheets. as the SHeets would keep on increasing and it can be maintained for atleast a year where as many as 35-38 Matches might be played.

    Warm REgards
    e4excel
    Last edited by e4excel; 02-12-2012 at 03:26 AM.

  12. #12
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Dear Forum,

    Is there a way of getting the Max of the Filled Rows from Multiple Sheets with a Dynamic Formula ?

    I intend to use a defined name to store the Sheet Names..

    REgards
    e4excel

  13. #13
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Quote Originally Posted by e4excel View Post
    ...Is there a way of getting the Max of the Filled Rows from Multiple Sheets...
    Try this Array Formula.

    Enter the sheet names in a range & define a name SheetList, then

    =MAX(IF(T(OFFSET(INDIRECT("'"&SheetList&"'!A1"),ROW(A1:A200)-ROW(A1),))<>"",ROW(A1:A200)))

    NOTE: If you enter sheet names in vertical cells, use TRANSPOSE(SheetList)

    Sheet separator in Array must be Comma NOT semi colon. TRANSPOSE will do that, if it is on vertical cells.

    Assume column A contains only text NOT numbers.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  14. #14
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Thanks a Lot Haseeb, Very Helpful
    Wow that Surely Works and on adding new sheets also it should work..

    However, IS there a different solution for text and numbers , cant we have a more generic solution which can still give us the Last Filled Row No from Multiple Sheets immaterial of its nature of content...

    Warm REgards
    e4excel

  15. #15
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Dear Haseeb,

    I was studying your code its just amazing, you actually have three arrays which are then compared for the MAX..

    Can you please explain the code , would really appreciate that..

    Warm REgards
    e4excel

  16. #16
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: Getting Max/Min,Last Filled Row# from Multi-Sheets same Format different Rows.

    Quote Originally Posted by e4excel View Post
    ...Last Filled Row No from Multiple Sheets immaterial of its nature of content...
    Try this Array Formula.

    =MAX(IF(SUBTOTAL(3,OFFSET(INDIRECT("'"&SheetList&"'!A1"),ROW(A1:A200)-ROW(A1),)),ROW(A1:A200)))

    As I mention previous post, If you enter sheet names in vertical cells, use TRANSPOSE(SheetList)

  17. #17
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Getting Max & Min and Last Filled Row No from Multiple Sheets with the same Forma

    Hey Thanks Haseeb for the Independent Version...!

    CAn you please explain the code ...
    especially the TRANSPOSE portion...

+ 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