+ Reply to Thread
Results 1 to 5 of 5

Array formula to return text

  1. #1
    Registered User
    Join Date
    03-18-2009
    Location
    Eugene, Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Array formula to return text

    I have an Array formula that returns a value from several rows below:
    =MAX(IF($P$8:$AQ$8="Today",$P13:$AQ13))

    Row 8 contains only text and only one occurrence of the word "Today".
    Row 13 has only numbers. The corresponding value directly below the column containing the word "Today" is returned successfully.

    I now need a similar formula to return a text entry located in the same column but on the previous row (row 12) directly above the value just returned and this row contains only text entries.

    Using the above formula and referencing $P12:$AQ12 returns 0 as expected.
    Last edited by RicWir; 03-18-2009 at 07:49 PM.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Array formula to return text

    Since "today" will only appear once in row_8
    Try these formulas:
    For the number:

    Please Login or Register  to view this content.

    For the text:

    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    03-18-2009
    Location
    Eugene, Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Array formula to return text

    The formula: #HLOOKUP("today",$P$8:$AQ$13,6,0)# will pose a problem in that there are 100 groups of data needing the same formula but only one header row which contains the word "today". It works great for the first group however. Thanks for such a quick reply!

    Actually, I can make it work by changing the row_index_num at each group. I'm still open for other suggestions but this will get me through for now. Thanks Ron!
    Last edited by RicWir; 03-18-2009 at 06:28 PM. Reason: Solution will work after all.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723

    Re: Array formula to return text

    Perhaps INDEX/MATCH is more easily adaptable for you

    =INDEX($P13:$AQ13,MATCH("Today",$P$8:$AQ$8,0))

    just change the first range depending on the row from which you want to return data

  5. #5
    Registered User
    Join Date
    03-18-2009
    Location
    Eugene, Oregon
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Array formula to return text

    Works Great! Thanks daddylonglegs.

+ 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