# Formula to Find Items which Meet Criteria in Mult Columns

#### aggiedave05

##### New Member
OK...I have a list with 50+ columns. I want to go through each column and get a listing of records which meet a criteria. I realize I could make a filter each column individually to get these names and then copy/paste, but hoping to get something much faster.

For example if I want to get stores which meet sales of \$10 or more for each period (Columns B, C, D)

A_____________B________C_______D
1 STORE 1_______12_______15_______8
2 STORE 2________6_______9_______10
3 STORE 3_______15_______9_______15

Then in B4 it would say STORE 1, STORE 2
C4 STORE 1
D4 STORE 2 STORE 3

Keep in mind I am doing this with 50+ columns and 700+ rows of data.

THANKS!

### Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Try this code:

Code:
``````Sub counting()
Dim cols, i As Integer
Dim t, cma As String

cols = Application.WorksheetFunction.CountA(Range("1:1"))
For i = 2 To cols
For Each cl In Range(Cells(2, i), Cells(2, i).End(xlDown))
If t <> "" Then
cma = ", " 'for the first hit, don't use a comma separator
Else
cma = ""
End If
If cl.Value > 10 Then t = t & cma & Cells(cl.Row, 1)
Next cl
Cells(1, i).End(xlDown).Offset(1, 0) = t
t = ""
Next i

End Sub``````

Replies
1
Views
587
Replies
3
Views
599
Replies
3
Views
241
Replies
3
Views
411
Replies
2
Views
186

1,219,918
Messages
6,150,954
Members
450,996
Latest member
darko1515s

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back