close

fdgdf sdfsdf dfgfg sddsf fdgdf 

Line up list aaa bbb ccc ddd eee fff ggg hhh iii .......... To aaa   bbb   ccc ddd   eee   fff ggg   hhh  iii ....... Here is the macro Sub lineup() Dim mycell, myrange As Range Dim pointer As Range Dim indexnumber As Integer Dim tempstring As String indexnumber = 0 tempstring = "  " Set myrange = ActiveSheet.Range("B3:B5520") Set pointer = mysheet.Range("F3") For Each mycell In myrange indexnumber = indexnumber + 1 'each row has 5 sets of number If (indexnumber Mod 5) = 0 Then 'fomat of the lineup tempstring = tempstring & "'" & mycell.Text & "' +" pointer.Value = tempstring Set pointer = pointer.Offset(1, 0) tempstring = "  " Else 'formae of the line up tempstring = tempstring & "'" & mycell.Text & "' " End If Next 'add the last row numbers pointer.Value = tempstring End Sub .msgcontent .wsharing ul li { text-indent: 0; } 分享 Facebook Plurk YAHOO!

 

好站連結:http://tw.myblog.yahoo.com/winifred228952






































arrow
arrow
    全站熱搜
    創作者介紹
    創作者 ybcfcai 的頭像
    ybcfcai

    一点点地

    ybcfcai 發表在 痞客邦 留言(0) 人氣()