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

½Ð±Ðexcel °}¦C°ÝÃD

½Ð±Ðexcel °}¦C°ÝÃD

¦U¦ì¤j­ô:
¤p§Ì¦³¤@­Óexcel°}¦C°ÝÃD·Q­n±N¤u§@ªí1¡AÂà¨ì¤u§@ªí2¡C
¨Ã±N«~¦W­«±Æ¦ý¬O¤@ª½¥X°ÝÃD¡C
ÁÙ¦³¬O§_¥i¥H¤£¿ëªF¤u§@ªí1´Nª½±µ²£¥Í¤u§@ªí2¤º®e¡C
¬¡­¶Ã¯1.rar (17 KB)
lionliu

¦^´_ 15# lionliu
¬Ý¬Ý¦ì¸mªº®t²§
  1. MsgBox rng.Cells(1, 8).Address  '¬°¦ó¤£¬O
  2. MsgBox rng.Cells(i, 8).Address
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 14# GBKEE
ÁÂÁÂgb¤j­ôªº±Ð¾É¥i¥H¤F¡A¦ý¬O«o¦³¦a¤è¦³ºÃ°Ý¡C
r=rng.cells(1,8).value ¬°¦ó¤£¬O r=rng.cells( i , 8).value
lionliu

TOP

¦^´_ 13# lionliu
°Ñ¦Ò¬Ý¬Ý
  1. Dim R As String         '«¬ºA¬°¦r¦ê

  2. '³o¸Ì¤]­n­×§ï ·í§@¥Î¤¤ªº¤u§@ªí¬O¤u§@ªí1®É ·|¦³ "«¬ºA¤£²Å¦Xªº¿ù»~
  3. '.Cells(i, 4) = Cells(i, 2) * Cells(i, 3)        '­×§ï¦ì¸m DÄæ¥Ñ­pºâ¨D­È

  4. .Cells(i, 4) = .Cells(i, 2) * .Cells(i, 3)                             '­×§ï¦ì¸m DÄæ¥Ñ­pºâ¨D­È
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# GBKEE
ÁÙ¬O¿ù¦ý°ÝÃD¤£¤@¼Ë

Â^¨ú1.JPG Â^¨ú.JPG
lionliu

TOP

¦^´_ 11# lionliu
¬O³o¼Ë¶Ü?
  1. R = Rng.Cells(1, 8).Value
  2.             strcomma = WorksheetFunction.Find(",", R) '­×§ï¦ì¸m HÄæ,
  3.             lenstr = Len(R)
  4.             dsc = Right(R, lenstr - strcomma)
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ lionliu ©ó 2015-7-19 11:35 ½s¿è

¦^´_ 10# GBKEE
­è­è¦b´ú¸Õ¤@¦¸¡Aµ²ªG¬O:DO WHILE RNG <>"" ,RNG=11 µ²§ô¡ASHEETS 2 RUN¨ì ROW =11®É©|¥¼µ²§ô¡A
³o¤@¬qµ{¦¡·|¥X¿ùstrcomma = WorksheetFunction.Find(",", Sheets(1).Cells(i, 8))¡A
©Ò¥H§Ú¤~³o¼ËÃhºÃ¡A¦ý¬O·í§Ú°±±¼¦¹¿ù»~¤S¯à¶]§¹¥þ¡C
¤£ª¾¦¹¬q»yªk­þ¸Ì¥X¿ù¡AÁÙ¬O¤£À³¸Ó©ñ¦b¦¹¦ì¸m¡A­Y¦³¿ù«e3¶µ¤S¯à²£¥Í·P¨ì«D±`¤£¸Ñ¡C
lionliu

TOP

¦^´_ 9# lionliu

²Ä2©«ªºµ{¦¡½X
Rng ¤£´N¬O ²Ä¤@­Ó¤u§@ªíªºRow
i  ¬O ²Ä¤G­Ó¤u§@ªíªºRow
  1.   Set Rng = Sheets(1).[A2]
  2. 05.    With Sheets(2)
  3. 06.        .UsedRange.Clear              '.UsedRangeªº½d³ò < .Cellsªº½d³ò,³B¸Ì³t«×·|§Ö¨Ç
  4. 07.        .Range("a1").Resize(, 4) = Array("Description", "Qty", "Price", "Amount") '¤@°_µ¹­È
  5. 08.        i = 2                          '³]©w°_©l­È
  6. 09.        Do While Rng <> ""             'Rng ="" °j°é°±¤î
  7. 10.            If Msg = False Then
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ lionliu ©ó 2015-7-18 20:50 ½s¿è

¦^´_ 8# GBKEE
¨ä¹ê¬O§Ú¤£¦n·N«ä¡A¨ü¨ìgb¤j­ôªº±Ð¾ÉÀò¯q¨}¦h¡A§Ú·|¦A§V¤O¥h§¹¦¨¥¦
¡AÁÙ¬O­n¦A¦¹¸ò§A»¡ÁÂÁ¡C§Ú·Q­Y¯à§JªA¤u§@ªí1ªºROW­È»P¤u§@ªí2ªºROW¹ïÀ³°ÝÃD§Y¥i¡C
lionliu

TOP

¦^´_ 7# lionliu
¤£¦n·N«ä,¬Ý¤£¥XªþÀɪº³W«ß©Ê,VBA¼g¤£¥X¨Ó.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD