+ Reply to Thread
Results 1 to 5 of 5

Return array of values based on text

  1. #1
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Return array of values based on text

    Hi,

    I'm creating a holiday planner that has dates in one row from Jan-Dec and a list of names in column A.

    I am trying to create a report on a separate sheet that returns all dates based on a the code entered in the rows beneath.

    I'm currently using this:

    Please Login or Register  to view this content.
    where B25 has the value of the fist code, in this case "H" (for Holiday)

    This works great for the first entry of the letter "H" and returns the date above as expected.

    Can someone point me in the direction to return all occurrences in the row that have a "H" below.

    Your help is much appreciated.
    Last edited by djm601; 11-19-2012 at 11:13 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Return array of values based on text

    One way is using INDEX with SMALL(IF, as an array formula.

    If this is accepted, pls upload a small sample workbook.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Return array of values based on text

    Thanks for the quick response.

    I've added a sample attachment. The formula is in green on the sheet.

    Cheers,

    DAve
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Return array of values based on text

    There has to be a better solution, but once your data is in landscape mode, convert them to vertical and have the desired effect.

    See the example.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: Return array of values based on text

    Thank you - your help is much appreciated.

    I was almost there when you mentioned SMALL, IF... but ran into the same problem with it being in landscape. Wasn't aware of the Transpose function, so I've learnt two things today.

    Appreciate you help .

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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