+ Reply to Thread
Results 1 to 8 of 8

Incorporating the results of a MAX function in to an OFFSET Function

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    Dayton Ohio
    MS-Off Ver
    Excel 2010
    Posts
    4

    Incorporating the results of a MAX function in to an OFFSET Function

    I'm pulling my hair out on what I thought would be simple. I have a spreadsheeet with 31 tabs for each day of the month starting with tab ONE and ending with THIRTYONE then the last tab is a "ROLLUP" TAB. In that Tab I want to find the MAX number in all of the Cells D20 across all 31 tabs (no problem using the formula =MAX(ONE:THIRTYONE!D20) ) but want to be able to have another formula to take that result and return the value in P20 of the SAME Sheet that had the Max Value. I thought I could use the offset command and use the MAX function as the reference then just offset the result by 12 columns. I thought this formula would work but doesn't: =OFFSET(MAX(ONE:THIRTYONE!D20)0,12). I've attched a file same. On the rollup tab in Cell D13 is where I'm trying to use the results on the max function from C13. Any suggestions on this? Thanks so much for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    Hi and welcome to the forum!

    Go to Name Manager and create a new name, WS_Names, say, and enter this in the Refers to: box:

    =RIGHT(GET.WORKBOOK(1),LEN(GET.WORKBOOK(1))-FIND("]",GET.WORKBOOK(1)))

    Exit Name Manager. Then, in D13 of your ROLL UP (MONTH) sheet and copy down, this array formula:

    =SUM(IFERROR((N(OFFSET(INDIRECT(WS_Names&"!D20"),,,,))=C13)*(N(OFFSET(INDIRECT(WS_Names&"!P20"),,,,))),""))

    Note: this assumes that the maximum of each of the Sheets' D20 values is unique.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    11-15-2013
    Location
    Dayton Ohio
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    Quote Originally Posted by XOR LX View Post
    Hi and welcome to the forum!

    Go to Name Manager and create a new name, WS_Names, say, and enter this in the Refers to: box:

    =RIGHT(GET.WORKBOOK(1),LEN(GET.WORKBOOK(1))-FIND("]",GET.WORKBOOK(1)))

    Exit Name Manager. Then, in D13 of your ROLL UP (MONTH) sheet and copy down, this array formula:

    =SUM(IFERROR((N(OFFSET(INDIRECT(WS_Names&"!D20"),,,,))=C13)*(N(OFFSET(INDIRECT(WS_Names&"!P20"),,,,))),""))

    Note: this assumes that the maximum of each of the Sheets' D20 values is unique.

    Regards
    I thought I replied but does not appear that it was posted so I'll try again. I wanted to thank you for your reply and help. I followed these instructions and my result came back as "0". I know the Max Value function for cell C13 in the ROLL UP tab is located in the FIVE tab. Cell P20 is 88.12 for that sheet (FIVE) and that's the result I'm looking for in Cell D13 in the ROLL UP tab. Not sure where to go from here, but again thank you for your time and help.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    And you're sure you know how to enter array formulas in Excel? Works fine for me based on your attachment.

    Regards

  5. #5
    Registered User
    Join Date
    11-15-2013
    Location
    Dayton Ohio
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    Quote Originally Posted by XOR LX View Post
    And you're sure you know how to enter array formulas in Excel? Works fine for me based on your attachment.

    Regards
    That's probably where I'm having the issue. I do not use array formulas much so my apologies for my lack of experience in this. Here is what I did, but I'm sure something is wrong. I entered in cell D13 of the ROLL UP Tab the following formula {=SUM(IFERROR((N(OFFSET(INDIRECT(WS_Names&"!D20"),,,,))=C13)*(N(OFFSET(INDIRECT(WS_Names&"!P20"),,,,))),""))} (I thought you use the {} in arrays) then used CTRL+SHIFT+ENTER. this is after creating the WS_Names as your instructions noted. What did I do wrong.. as I'm sure my inexperience here isn't helping. Thank you so much for your willingness to help.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    Hi,

    I'm a bit worried from your description that you may have entered the curly brackets {} manually (?), which is not what you should be doing (if you commit the formula correctly - with CTRL+SHIFT+ENTER - Excel will insert these automatically).

    Regards

  7. #7
    Registered User
    Join Date
    11-15-2013
    Location
    Dayton Ohio
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    Quote Originally Posted by XOR LX View Post
    Hi,

    I'm a bit worried from your description that you may have entered the curly brackets {} manually (?), which is not what you should be doing (if you commit the formula correctly - with CTRL+SHIFT+ENTER - Excel will insert these automatically).

    Regards
    I got it working and again want to thank you for your time and expertise. What I did wrong was I copied the array formula with my cursor in the cell I want the result, then did the Ctrl+Shift+Enter and that didn't work. I erased the content, copied in to the formula bar, then did the CTRL+Shift+Enter and that works. This has encouraged me to go back and learn more about array formulas. Again.. thanks so very much for your help!

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Incorporating the results of a MAX function in to an OFFSET Function

    You're welcome, and glad you got it to work!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Incorporating a CountIF function into VBA
    By jbumps in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2012, 06:21 PM
  2. Incorporating IF Function into DAYS360 Function
    By Journee22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2012, 02:25 PM
  3. Offset function with unexpected results
    By Coaster in forum Excel General
    Replies: 10
    Last Post: 07-01-2010, 04:09 AM
  4. Offset based on results of Max function
    By Paul987 in forum Excel General
    Replies: 4
    Last Post: 02-15-2008, 02:43 PM
  5. [SOLVED] Function with results in offset cell
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2005, 02:05 PM

Tags for this Thread

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