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

¦p¦ó¥ÎVBA¨ú¥XÃöÁä¦r

¦p¦ó¥ÎVBA¨ú¥XÃöÁä¦r

¥»©«³Ì«á¥Ñ jsc0518 ©ó 2017-2-18 19:29 ½s¿è

¦U¦ì¥ý¶i¡A§Ú¦³4­ÓÃöÁä¦r-°£Åv°£®§¡BµoªÑ®§¡Bº¦¡B¶^
­n¦p¦ó§Q¥ÎVBAªº¤è¦¡±NAÄæ¦Cªº¦r¦ê§ä¥XÃöÁä¦r¡A¨Ã©óBÄæ¦C¤W¨q¥X¨äÃöÁä¦r
µe­±¦p¤U¹Ï
¦A½Ð¦U¦ì¥ý¶i«ü¾É


Noname.jpg
Just do it.

¦^´_ 1# jsc0518

If InStr([A1], "°£Åv°£®§") Then [B1] = "°£Åv°£®§"
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 2# VBALearner


±z¦n¡A§Ú§ï¤F»yªk¡A¦ý¬O¥X²{¿ù»~

Sub InStr()

For i = 1 To [a65536].End(3).Row
If InStr([Ai], "°£Åv°£®§") Then [Bi] = "°£Åv°£®§"
If InStr([Ai], "µoªÑ®§") Then [Bi] = "µoªÑ®§"
If InStr([Ai], "º¦") Then [Bi] = "º¦"
If InStr([Ai], "¶^") Then [Bi] = "¶^"
Next

End Sub
Just do it.

TOP

¦^´_ 3# jsc0518
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 3# jsc0518
  1. Option Base 1
  2. Sub test()

  3.     Dim str
  4.     str = Array("°£Åv°£®§", "º¦", "¶^", "µoªÑ®§")
  5.    
  6.     For i = 1 To [A1].End(xlDown).Row
  7.         For j = 1 To UBound(str)
  8.             If InStr(Cells(i, 1), str(j)) Then Cells(i, j + 1) = str(j)
  9.         Next
  10.     Next

  11. End Sub
½Æ»s¥N½X
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 5# VBALearner


³o¬q»yªk¤]´ú¸Õ¦¨¥\¡A¦ý»yªk­n§ï¦¨§ä¨ìÃöÁä¦r«á¡A¥þ³¡©ñ¦b"BÄæ"¤U¡A§Ú§ï»yªk«á¤´¥¢±Ñ
Just do it.

TOP

¦^´_ 6# jsc0518

¥u­n§ïcells(¦C,Äæ)ªºÄ欰2´N¥NªíBÄæ¡A³o«D±`°ò¦¡Aºô¸ô¦hª¦¤å
  1. Option Base 1
  2. Sub test()

  3.     Dim str
  4.     str = Array("°£Åv°£®§", "º¦", "¶^", "µoªÑ®§")
  5.    
  6.     For i = 1 To [A1].End(xlDown).Row
  7.         For j = 1 To UBound(str)
  8.             If InStr(Cells(i, 1), str(j)) Then Cells(i, 2) = Cells(i, 2) & str(j)
  9.         Next
  10.     Next

  11. End Sub
½Æ»s¥N½X
¯u¤ß·PÁ¨C¤@¦ìÄ@·N¤À¨É©Ò¾Ç¡B«ü¾É·s¤âªº¤H!

TOP

¦^´_ 7# VBALearner

Dear VBALearner¡A·PÁ±zªº«ü¾É
§Úª¾¹D¤F  If InStr(Cells(i, 1), str(j)) Then Cells(i, 2) = Cells(i, 2) & str(j) --> Cells (¦C,Äæ)ªº·N«ä¤F
¦A¦¸·PÁ±z!
Just do it.

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD