View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Find Empty Column and paste cell values

worksheets("Sheet2").Range("A1:F1").Value = _
worksheets("Sheet1").Range("A1:F1").Value


Dim rng as Range
for each cell in Range("A1:IV1")
if application.countA(cell.EntireColumn) = 0 then
set rng = cell.Entirecolumn
Exit for
End if
Next
if not rng is nothing then rng.Select

--
Regards,
Tom Ogilvy


Mike wrote in message
...
I have a question that I hope someone can help.
I want to write a Macro that finds the first empy column in Range

(A1:IU),cells A1:F1=" ", in worksheet2
then paste the current values in Worksheet1,cells (A1:F1) to Worksheet2,

(a1:f1).

thanks for the help

mike