View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Justin Philips Justin Philips is offline
external usenet poster
 
Posts: 32
Default Simple Excel macro

try this:

Sub Copy()
Dim x, y, c As Single

x = 1
y = 1
c = ActiveCell.Column

Do While Cells(x, c).Value < ""
If Cells(x, c).Value = "1" Then
Range("C" & x).Select
Range("C" & x).Copy
Range("B" & y).PasteSpecial
y = y + 1
End If
x = x + 1
Loop
End Sub

so will you be running this macro fifty times?
you could have it run through all fifty columns and paste everything
into a new sheet. I dont know what your needs are.
HTH
-Justin