ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

²Õ¦X¦r¦ê¥[¤JªÅ¥Õ¦r¤¸°Ï¹j

²Õ¦X¦r¦ê¥[¤JªÅ¥Õ¦r¤¸°Ï¹j

°ÝÃD´y­z¦p¹Ï¥Ü¡A·q½Ðª©¤Í­Ì«ü±Ð¡AÁÂÁ¡I

Fig_1.JPG (74.54 KB)

Fig_1.JPG

²Õ¦X¦r¦ê¥[¤JªÅ¥Õ°Ï¹j.zip (4.36 KB)

¦^´_ 13# ­ã´£³¡ªL

If Val(QBy) > 0 Then QBase = QBase

½Ð°Ý³o¥y©ñ¦bFunction ©M ©ñ¦b Sub¤¤·|¦³¤£¦Pµ²ªG¡A爲¤°麽¡H
ss

TOP

  1. Function QQString(QBase, QMark$, QBy%) As String
  2. Dim TT$, xR
  3. If Val(QBy) > 0 Then QBase = QBase
  4. For Each xR In QBase
  5. ¡@¡@If xR <> "" Then TT = TT & QMark & xR
  6. Next
  7. QQString = Mid(TT, 2)
  8. End Function
½Æ»s¥N½X
¡@
¤½¦¡¡G=QQString(A1:E5,"-",0)
¡@¡@¡@=QQString(A1:E5,"-",1)
¡@
QMark¡]³s±µ²Å¸¹¡^¡DQBy=0¡]´`¦C¡D¥Ñ¥ª¦Ó¥k¡Ö¥Ñ¤W¦Ó¤U¡^¡DQBy>0¡]´`Äæ¡D¥Ñ¤W¦Ó¤U¡Ö¥Ñ¥ª¦Ó¥k¡^

TOP


¥i»s¦¨¼W¯q¶°«á¤Þ¥Î
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# zz5151353

¤Ó¦n¤F¡A§A³o²µuªºVBA§Ú¬Ý±oÀ´¡C¦³¤@¦æ¦n¹³¥i¥H¤£¥Î¡C
  1. Function zz(i As Range) As String
  2.     For Each j In i
  3.         zz = Trim(zz & " " & j)
  4.     Next
  5.     'zz = Application.WorksheetFunction.Substitute(A, " ", " ")
  6. End Function
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

³o­Ó¦Û­q¨ç¼Æ¥i¥H¦Û¤v³]©w¦ê±µ²Å¸¹¡F °²¦p¦ê±µªº¬O¦hÄæ¦h¦C¡AÁÙ¥i¥H³]©w¥ýÄæ«á¦C¡]©Î¬O¥ý¦C«áÄæ¡^

¦^´_  zz5151353
sunnyso µoªí©ó 2013-6-4 00:29
ss

TOP

¦^´_ 3# zz5151353
ªº½T¶È¯à¥HVBA¸Ñ¨M°ÝÃD¡A«D±`·PÁÂMr. zz5151353´£¨Ñ²¼ä©ú½Tªº³q«h¸Ñªk¡C
ps. ¸ÓVBA»yªk¥²¶·¸m©ó¡u¼Ò²Õ¡v¤º¤è¥iµo´§¥\¯à¡A¤£µM±N·|¥X²{4# Mr. aer©Ò´£¤§¡u¥X²{ #NAME?¡v°ÝÃD¡C

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-6-4 06:28 ½s¿è
ª©¥D¡A½Ð°Ý±z¬O¦p¦ó°µªº?¬°¤°»ò§Ú·Ó±zªº¤èªk¥´¡A¥i¬O³£·|¥X²{ #NAME? ©O¡HÁÂÁÂ
aer µoªí©ó 2013-5-25 09:35

E2 (E2Ä椺¤§¿é¤J¤º®e)¡G
  1. =CONCATENATE(A2, " ", B2, " ",C2, " ",D2)
½Æ»s¥N½X
©ÎªÌ¬Oª½±µ¿é¤J¡G
  1. =A2 & " " & B2 & " " & C2 & " " & D2
½Æ»s¥N½X
¨âªÌµ²ªG­È¬O¤@¼Ëªº¡C
´¥Ð«Hªø §õ¥@¥Á ±ä¾Þ ¤ý¤§µA

TOP

  1. Function CONTEXT(inprng As Range, Optional delimiter As String, Optional row1st As Boolean) As String
  2.     'delimiter Optional. String character used to separate the substrings in the returned string.
  3.     'If omitted, a zero-length string (""), all items in the list are concatenated with no delimiters.
  4.     'row1st Optional. Boolean from Row to Column. If omitted, from column to row
  5.     Dim RowN As Double
  6.     Dim ColN%, i%
  7.     Dim TmpAr() As Variant
  8.     RowN = IIf(inprng.Rows.Count < 16384, inprng.Rows.Count, 16384)
  9.     ColN = inprng.Columns.Count
  10.    
  11.     Select Case 0
  12.         Case RowN + ColN - 2
  13.             CONTEXT = inprng
  14.         Case RowN - 1
  15.             CONTEXT = Join(Application.Transpose(Application.Transpose(inprng)), delimiter)
  16.         Case ColN - 1
  17.             CONTEXT = Join(Application.Transpose(inprng), delimiter)
  18.         Case Else
  19.             If row1st = True Then
  20.                 ReDim TmpAr(1 To RowN)
  21.                 For i = 1 To RowN
  22.                     TmpAr(i) = Join(Application.Transpose(Application.Index(Application.Transpose(inprng), , i)), delimiter)
  23.                 Next i
  24.                 CONTEXT = Join(TmpAr, delimiter)
  25.             Else
  26.                 ReDim TmpAr(1 To ColN)
  27.                 For i = 1 To ColN
  28.                     TmpAr(i) = Join(Application.Transpose(Application.Index(inprng, , i)), delimiter)
  29.                 Next i
  30.                 CONTEXT = Join(TmpAr, delimiter)
  31.             End If
  32.     End Select
  33. End Function
½Æ»s¥N½X
¦^´_ 3# zz5151353
ss

TOP

§Q¥ÎFUNCTION¦Û­q¨ç¼Æ¡A¥H¤À¹j²Å¸¹³s±µ¤å¦r¦ê¡A¥i¯à¸û²³æ«K§Q¡A¤]¸û¨ã¼u©Ê¡I

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD