Offset index then concatenate in a textbox

I have an index column (W4:W293) that starts at "1" and ends at "288". In column (AA4:AA293) there could be an empty cell or a value of one to five. What I need is to lookup the corresponding number in column W if the value is greater than three in column AA. Then populate a textbox with the index values separated by a comma.

Attached is a spreadsheet to aid in visualization.

Thanks in advance!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Let's GoCommented:
Here is a user-defined function ConcatenateIf,  which is slightly adjusted from an excellent UDF posted by HansV MVP at
Function ConcatenateIf(CriteriaRange As Range, _
        ConcatenateRange As Range, Optional Separator As String = ",") As Variant
    Dim i As Long
    Dim strResult As String
    On Error GoTo ErrHandler
    If CriteriaRange.Count <> ConcatenateRange.Count Then
        ConcatenateIf = CVErr(xlErrRef)
        Exit Function
    End If
    For i = 1 To CriteriaRange.Count
        If CriteriaRange.Cells(i).Value >= 3 Then
            strResult = strResult & Separator & ConcatenateRange.Cells(i).Value
        End If
    Next i
    If strResult <> "" Then
        strResult = Mid(strResult, Len(Separator) + 1)
    End If
    ConcatenateIf = strResult
    Exit Function
    ConcatenateIf = CVErr(xlErrValue)
End Function

Open in new window

You can refer to this UDF from any cell in the workbook; I am not sure off the top of my head how to put the answer into a text box.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Let's GoCommented:
Attached is a revised version which uses a cell (W1) to calculate the list, then puts it into a text box.
jcgrooveAuthor Commented:
I just used the "Linked cell" property of my active-x textbox and it worked!
jcgrooveAuthor Commented:
I couldn't get the textbox to populate.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.