• Nest functions inside OFFSET function (Excel XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Nest functions inside OFFSET function (Excel XP)

    Author
    Topic
    #377275

    Example: Column “A” contains numbers for the days in the current month (i.e 1, 2, 3 through 31). Column “B” contains the total sales numbers for each day. We want a cell that pulls the max from column “B” and returns the day of the month that corresponds to that highest number from column “A”. Can the OFFSET function be used for this – and can I nest the MAX function inside of it (i.e. = OFFSET(MAX(B8:B38),0,-1). Seems like it should work, but it just WON’T. It tells me the syntax for the formula is incorrect. I’ve tried all types of configurations possible, with no luck). Is this not a proper use of the OFFSET function?

    As an aside – I could get the proper result by inserting the days of the month in column “C”, hiding that column and then creating a VLOOKUP formula that looks for the highest number in column “B” and returning the associated value in column 2(“D”). Used FALSE to indicate that the first column was not in ascending order.

    Any ideas, assistance or just informing me that it can’t be done this way, would be greatly appreciated.

    Viewing 0 reply threads
    Author
    Replies
    • #620941

      You don’t have to lookat column A, the match gives you the number directly.:

      =MATCH(MAX(B1:B31),B1:B31,FALSE)

      Steve

      • #620965

        Thank you, Steve. It worked like a charm. I was trying to make it too difficult!

        • #621003

          I should mention the caveat:
          You must have all the days of the month inclusive in ascending order. This does not actually LOOK at col A. It just finds what occurence down from the top in col B (1st, 2nd, 3rd, etc). Since you said that is how it is numbered, you can ignore looking at A.
          Steve

          • #621137

            After about 5 minutes of thinking it was magic, we figured that out when we deleted the info in column “A” and the function still worked. Thanks again.

    Viewing 0 reply threads
    Reply To: Nest functions inside OFFSET function (Excel XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: