EDIT #1, pictures from last post removed
OK, let's try this instead. You start out with a workbook like this:
Try running this modification of your code:
Sub TopComp()
Dim i As Range, TargetRng As Range
Dim TargetCounter As Long
Dim AllSheet As Worksheet, TopSheet As Worksheet
'declare worksheets for easy reference
Set AllSheet = ThisWorkbook.Worksheets("All Competition")
Set TopSheet = ThisWorkbook.Worksheets("Top 10 Competition")
For Each i In AllSheet.Range("E32:BL32")
If i.Value > 9 Then
TargetCounter = TargetCounter + 1
Set TargetRng = TopSheet.Cells(1, TargetCounter).EntireColumn
i.EntireColumn.Copy TargetRng
End If
Next i
End Sub
That should give you to the following, which is what I think you want:
--
Cool -- let's say you start with the workbook looking like this:
You can run this code to populate with the columns that have an end value > 10:
Option Explicit
Sub CheckColumns()
Dim LastCol As Long, LastRow As Long, _
ColIdx As Long, TargetColCounter As Long
Dim SheetOne As Worksheet, SheetTwo As Worksheet
Dim ColRng As Range, TargetRng As Range
'assign sheets for easy reference
Set SheetOne = ThisWorkbook.Worksheets("Sheet1")
Set SheetTwo = ThisWorkbook.Worksheets("Sheet2")
'identify the last row and last column to set bounds on loop
LastRow = SheetOne.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
LastCol = SheetOne.Cells.Find("*", SearchOrder:=xlByColumns, SearchDirection:=xlPrevious).Column
'loop through the columns
For ColIdx = 1 To LastCol
If SheetOne.Cells(LastRow, ColIdx).Value > 10 Then
TargetColCounter = TargetColCounter + 1
Set ColRng = Range(SheetOne.Cells(1, ColIdx), SheetOne.Cells(LastRow, ColIdx))
Set TargetRng = Range(SheetTwo.Cells(1, TargetColCounter), SheetTwo.Cells(LastRow, TargetColCounter))
ColRng.Copy TargetRng
End If
Next ColIdx
End Sub