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

[µo°Ý] ­pºâ¦V¤U½c¼Æ¥[¤@

[µo°Ý] ­pºâ¦V¤U½c¼Æ¥[¤@

§Ú·Q½Ð°Ý¦³¨S¤HÀ´¥Îexcel   formulas  or VBA, ¦Û°Ê­pºâ¦V¤U½c¼Æ¥[¤@,¦p¥k (column A, B  ªº¸ê®Æ,­n°µ¨ì(column C,D¨º¼Ë),
excel test.zip (9.12 KB)

¦^´_ 1# john2006168
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i As Integer
  4.     i = 2
  5.     With Sheets("sheet1")
  6.         .Range("D2:E" & .Range("E1").End(xlDown).Row) = ""
  7.         Do While .Cells(i, "A") <> ""
  8.             If .Cells(i, "B") > 0 Then
  9.                 .Cells(.Rows.Count, "D").End(xlUp).Offset(1).Resize(.Cells(i, "B"), 2) = Array(.Cells(i, "A"), "=ROW()-1")
  10.             End If
  11.             i = i + 1
  12.         Loop
  13.         .Range("E:E") = .Range("E:E").Value
  14.     End With
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

John test VBA.zip (297.98 KB) ¦^´_ 2# GBKEE
¦hÁ¦ѮvÀ°¦£¸Ñ¨M§Úªº°ÝÃD.
    ¥t¥~,§Ú·Q°Ý¦pªG¦P1ªO¥u¦³¤@­Ó¬Û¦Pªº"Ref#",¨Ò¦p²Ä2ªO ¥u¦³¤@­Ó¬Û¦PªºJN130720028,¨º»òµ²ªG¥uÅã 1­Ó½c¸¹½X ref no :JN130720028           Cartons no :31-32.   ¨ä¥L¤£ÅÜ,
½Ð°ÝÀ³¸Ó«ç»ò¼g??

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-8-5 14:54 ½s¿è

¦^´_ 3# john2006168
§A¤W¶Ç³oÀÉ®×¹ï¶Ü?»P©Ò°Ýªº¦n¹³¨SÃö³s!

Set x = Sheets("DataBasa")¦³¿ù»~  ->  Sheets("DataBasa ") ­n¦h¤@­ÓªÅ®æ
­×§ï ¤u§@ªí"DataBasa "
  1. Private Sub Enter_Click()
  2. Set x = Sheets("DataBasa ")
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE


    sorry,attached wrong file ,pls find the attachment excel test.zip (16.12 KB)

TOP

¦^´_ 1# john2006168

B2=Row()-1
b2¦V¤U½Æ»s¤½¦¡
lmh

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD