delete blanks - sporadic
Thanks so much Gord. I tried it but got an error message, so I tried this one
from Toppers on 9/6/06 instead and it works...Thanks again :)
Sub CopyAndMerge()
Dim inrange As Range, outrange As Range
Dim cValue As Variant
Dim r As Long, c As Integer
Set inrange = Application.InputBox(prompt:="Select Input range", Type:=8)
Set outrange = Application.InputBox(prompt:="Select Output range", Type:=8)
Do While Application.Or(outrange.Rows.Count < 1, outrange.Columns.Count < 1)
MsgBox "Output range must be a single cell"
Set outrange = Application.InputBox(prompt:="Select Output range", Type:=8)
Loop
For r = 1 To inrange.Rows.Count
For c = 1 To inrange.Columns.Count
outrange.Value = inrange(r, c).Value
Set outrange = outrange.Offset(1, 0)
Next c
Next r
End Sub
"Gord Dibben" wrote:
Should read "not" part of the code.
Gord
On Wed, 17 Jan 2007 16:19:16 -0800, Gord Dibben <gorddibbATshawDOTca wrote:
The ' lets Excel know it is part of the code.
|