snoopies
06-21-2006, 09:53 PM
Hi all,
I wrote a simple code to merge rows, but it causes the problem when having blank rows. I've attached a file to explain what I want to do..Thank you for kind attention!! :bow:
Public Sub MergeRows()
Set myRange = Range("A1:A50")
For Each c In myRange
jText = jText & "+" & c
Next
Range("B2") = jText
End Sub
[vba]
PROBLEM+1+2+3+4+5+6+7+8++++++14+15+16+17+18+19+20+21+22+23+24+25+26+++++31+ 32+33+34+35+36+37+38+39+40+41+42+43+44+45+46+47+48+49+50
I wrote a simple code to merge rows, but it causes the problem when having blank rows. I've attached a file to explain what I want to do..Thank you for kind attention!! :bow:
Public Sub MergeRows()
Set myRange = Range("A1:A50")
For Each c In myRange
jText = jText & "+" & c
Next
Range("B2") = jText
End Sub
[vba]
PROBLEM+1+2+3+4+5+6+7+8++++++14+15+16+17+18+19+20+21+22+23+24+25+26+++++31+ 32+33+34+35+36+37+38+39+40+41+42+43+44+45+46+47+48+49+50