+ Reply to Thread
Results 1 to 2 of 2

Eliminate N/A from spreadsheet and open range of search

  1. #1
    Registered User
    Join Date
    06-23-2011
    Location
    Nantucket, RI
    MS-Off Ver
    Excel 2003
    Posts
    35

    Eliminate N/A from spreadsheet and open range of search

    Thank you NBVC!

    The answer below worked perfectly for me.

    Thank you for the help!

    Anthony

    To hide the N/A you could use an error trap:

    =IF(ISNA(INDEX(schedule!$A:$AA,MATCH(A3,schedule!$K:$K,0),MATCH(G$1,schedule!$A$1:$AA$1,0))),"",INDE X(schedule!$A:$AA,MATCH(A3,schedule!$K:$K,0),MATCH(G$1,schedule!$A$1:$AA$1,0)))

    To retrieve multiple dates in the same cell, you need a User Defined Function.. and you would need to use limited ranges instead of whole columns... and also efficiency would be reduced.

    You can try this udf:


    Code:
    Function aconcat(a As Variant, Optional sep As String = "") As String
    ' Harlan Grove, Mar 2002
    Dim y As Variant

    If TypeOf a Is Range Then
    For Each y In a.Cells
    aconcat = aconcat & y.Value & sep
    Next y
    ElseIf IsArray(a) Then
    For Each y In a
    aconcat = aconcat & y & sep
    Next y
    Else
    aconcat = aconcat & a & sep
    End If

    aconcat = Left(aconcat, Len(aconcat) - Len(sep))
    End FunctionThen apply formula in G3 of Ad sheet:


    Code:
    =SUBSTITUTE(TRIM(MCONCAT(IF(schedule!$K$3:$K$64=A3,TEXT(schedule!$A$3:$A$64,"d-mmm")," ")))," ",", ")which you must confirme with CTRL+SHIFT+ENTER and not just ENTER and copy down... make adjustments as necessary and reconfirm with CSE before copying down and/or across.

    I have attached my current spreadsheet.
    This includes a schedule on tab 1 and three different pages Ad, Pr, and Po that contain a list of materials to search the schedule for.

    1. Currently if the search doesnt find the value on the schedule page it returns n/a.
    I understand why, but would like to hide/eliminate that.

    2. Right now the search will look through the schedule to find a match. Once that match is found it stops.
    It is possible that we will make that material more than just that one time and if so I would like the search to return EVERY date that product is being made.

    Any help is greatly appreciated.

    Anthony
    Attached Files Attached Files
    Last edited by bellicusa; 01-17-2012 at 01:52 PM. Reason: Problem Solved

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Eliminate N/A from spreadsheet and open range of search

    To hide the N/A you could use an error trap:

    =IF(ISNA(INDEX(schedule!$A:$AA,MATCH(A3,schedule!$K:$K,0),MATCH(G$1,schedule!$A$1:$AA$1,0))),"",INDEX(schedule!$A:$AA,MATCH(A3,schedule!$K:$K,0),MATCH(G$1,schedule!$A$1:$AA$1,0)))

    To retrieve multiple dates in the same cell, you need a User Defined Function.. and you would need to use limited ranges instead of whole columns... and also efficiency would be reduced.

    You can try this udf:

    Please Login or Register  to view this content.
    Then apply formula in G3 of Ad sheet:

    Please Login or Register  to view this content.
    which you must confirme with CTRL+SHIFT+ENTER and not just ENTER and copy down... make adjustments as necessary and reconfirm with CSE before copying down and/or across.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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