View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Melanie O Melanie O is offline
external usenet poster
 
Posts: 2
Default Skip blank cells on transpose in a macro

I am using the following code to copy a column of data and paste
special/transpose into a new workbook:

Windows("Survey.xls").Activate
Range("B7:B21").Select
Selection.Copy
Windows("Book1").Activate
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

The data in the column on the first workbook looks like this:

Name
<blank
Address
<blank
Phone
<blank
etc.

Is there a way to not paste the blank cells into the new workbook? Changing
the SkipBlanks:= to True didn't seem to work.

Thanks,
Melanie