Results 1 to 15 of 15

Concatenate if other column value is non-blank or non-zero BUT IN DESCENDING ORDER

Threaded View

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Athens, Greece
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    30

    Concatenate if other column value is non-blank or non-zero BUT IN DESCENDING ORDER

    Hello,
    In column A I have blank cells or numbers (could be zero as well)
    In column B I have names, e.g. Peter, John, Mary etc

    For example let's have 3, 0, "", 4, 4, 6, 0, 5, "", 1 in column A
    and Peter, John, Mary, Kate, Alan, Nick, George, Jenny, Tony, Helen

    I am looking for a way cell C1 will give me the names that have a non-zero or non-blank cell next to them BUT IN A DESCENDING ORDER according to the value in column B, separated by commas. That would be Nick, Jenny, Kate, Alan, Peter, Helen
    Nick comes first because he has the highest value (6), Jenny comes 2nd because she has the 2nd highest value, Kate and Alan come next...and so on

    If it is any help this is the function I have been using but does not deal with the DESCENDING ORDER problem. A function would be great but anything you can come up would also be great

    Function ccIFblank(SrcRng As Range, ConCatrng As Range)
    Dim diff As Integer
    diff = (ConCatrng.Column - SrcRng.Column)
    For Each c In SrcRng
    If c.Value <> "" Then
    ccIFblank = ccIFblank & c.Offset(, diff).Value & ", "
    End If
    Next
    ccIFblank = Left(ccIFblank, Len(ccIFblank) - 2)
    End Function
    Thanks a lot
    Last edited by Petros Georgilas; 12-05-2014 at 04:32 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 05-29-2014, 11:55 AM
  2. [SOLVED] Sort by descending order, but the blank spaces come on top
    By billj in forum Excel General
    Replies: 3
    Last Post: 07-18-2013, 04:18 PM
  3. Replies: 14
    Last Post: 04-17-2012, 05:18 PM
  4. Pivot table to show certain column in descending order
    By rushdenx1 in forum Excel General
    Replies: 1
    Last Post: 01-04-2012, 05:32 AM
  5. Date in descending order to come up automatically in a column?
    By Snugglebums in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2005, 12:06 PM

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