I'm new to Excel VBA, and after quite some time attempting to solve my issue, I am unable to create a working solution. The attached image is a mock up of an actual table I'm working with. I would like to:

[![enter image description here](https://i.stack.imgur.com/JrTLS.png)](https://i.stack.imgur.com/JrTLS.png)

**#1** Define a date in the VBA to search for in the blue row (e.g. 05/12/2022)

**#2** Once found, find all values of both 'Apple' and 'Pear' in that yellow column (Apple = 4 times, Pear = 1 time)

**#3** Look at the Green column, and store the names for all matches for 'Apple' in one array (later to be used in a string), and all matches for 'Pear' in another array

**#4** Input a comma delimited return of both arrays into a cell within the spreadsheet

Step #1 was completed successfully using the following code:

```
Public Sub MyVBA()

    Dim c As Range
    Dim colNum As Integer
    Dim wkb As Excel.Workbook
    Dim wks As Excel.Worksheet

    Set wkb = Excel.Workbooks("MyOtherWorkbook.xlsx")
    Set wks = wkb.Worksheets("SheetInWorkbook")

    For Each c In wks.Range("1:1")
        If c.Value = "05/12/2022" Then
            colNum = c.Column
        End If
    Next c

End Sub

```

Step #2 attempt:

```
    For Each c In wks.Columns(colNum)
        If c.Value = "Apple" Then
            MsgBox "Apple is " & c.Address
        End If
    Next c

```

This is one of various attempts I've made at Step #2, but each time it produces errors. Advice on how to go forward with Step #2 and #3 would be appreciated.