I think there were some copy/paste errors
try something like this
Usually you don't need to .Select something to use or act on it
Option Explicit
Sub HorizontalLoop()
Dim lCol As Long
Dim inputrange As String
Sheets("output").Select
For lCol = 1 To 100
If Not IsEmpty(Cells(1, lCol).Value) Then ' Row 1 ?????
'assuming that 2 lines were accidently joined, and they should have been
'inputrange = Cells(1, lCol).Value
'ActiveCell.EntireColumn.Select
'this does it from 'output' to 'input' which seems backwards to me
Columns(lCol).Copy Sheets("input").Columns(lCol)
End If
Next lCol
End Sub