+ Reply to Thread
Results 1 to 8 of 8

Thread: Make a list

  1. #1
    Registered User
    Join Date
    02-05-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Make a list

    Hello,
    I am trying to make excell display a list of the data in the cells of column A, but only if there is no information in column B.
    For example, column A represents A list of tasks, and column B is the list of people that completed each task leaving blanks in the cells for the tasks that have yet to be completed. I need a formula or function that will go threw the 300+ tasks and list the ones that are not completed.
    Thanks
    Last edited by listmaker1984; 02-09-2010 at 04:17 PM.

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

    Re: Need help making a list in excell 2007

    Try:

    =IF(ROWS($A$1:$A1)>COUNTBLANK($B$1:$B$300),"",INDEX($A$1:$A$300,SMALL(IF($B$1:$B$300="",ROW($B$1:$B$300)-ROW($B$1)+1),ROWS($A$1:$A1))))
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copied down 300 rows.

    adjust ranges to suit.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    02-05-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Need help making a list in excell 2007

    Kind of works. The code function that you provided just shows what was already done(ie the items with column b filled out), and it only filters out what is in that row.
    Just to clarify
    column A has a list of tasks- 1, 2, 3, 4, etc.
    column B has the clock number of the person who completed the task- 0001, 7777, 6500, etc
    I have a different book for each project, and each book has a different sheet for each type of job.
    Each job type has lists of individual jobs up to 300 tasks.
    Now let’s say that items 1, 2, 5, 6, 8, 9, 13 in column A have personnel next to them in column B.
    I need a formula that I can plug in to sheet 1 column A row 1 and it lists 3, 4, 7, 10, 11, 12 etc.
    It doesn’t matter if it stays in one cell, or if it is spread across rows. If you can put the commas in there somehow, great, otherwise I can just change the job number to "1,".
    Thanks for the help so far, I wasn’t expecting to get a response so soon.

  4. #4
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,563

    Re: Make a list

    The formula I provided (if you used CTRL+SHIFT+ENTER) to confirm it and then copy it down rows.. should only show you the iterms in column A that do not have an entry in column B...

    To concatenate them all into one string.. you can use a popular UDF by Harlan Grove that I like to recommend...
    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 Function
    Then apply

    =SUBSTITUTE(TRIM(SUBSTITUTE(aconcat(IF(B1:B300="",A1:A300,"")," "),0,""))," ",", ")

    confirmed with CTRL+SHIFT+ENTER not just ENTER
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  5. #5
    Registered User
    Join Date
    02-05-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Make a list

    Sorry for being a newbie at this, but can you please tell me how to get that function into excel?
    Once again, thanks for all the help.

  6. #6
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,563

    Re: Make a list

    While in the spreadsheet, hit ALT and F11 keys.. you should be in the Visual Basic Editor...

    Go to Insert|Module and paste the code in.

    Close the Editor and now apply the formula like any other formula.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  7. #7
    Registered User
    Join Date
    02-05-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Make a list

    Works perfectly, thanks a lot

  8. #8
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,563

    Re: Make a list

    From PM:

    Thanks a lot for the help on that list formula, it works almost perfectly. The only issue I have is that it ignores the 0s. For example it shoots out the list just as advertised, but it looks like 8, 9, 1, 11, 12, etc.
    so any number that has a 0 for a 2nd, or 3rd diget is shown as just the non 0 numbers.
    Is there any way I can tweak the formula so it shows the full value of the cell instead of changing it?
    Thanks for everything so far.
    Try instead:

    =SUBSTITUTE(TRIM(SUBSTITUTE(aconcat(IF(B1:B300="",IF(A1:A300<>"",A1:A300,""),"")," "),"",""))," ",", ")
    Confirmed with CTRL+SHIFT+ENTER
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0