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

[µo°Ý] ¦p¦ó±N¨C­Ó®É¬q¤ºªº«ü©w¼Æ­È©â¥X

A1min.rar (135.22 KB)
¦A½Ð±Ð¦p¦ó±N«ü©w®É¬q¤ºªº«ü©w¼Æ­È¨ú¥N¤W¤@­Ó/¤U¤@­Ó®É¬q¤º¬ÛÃö¼Æ­È?¤§«á­«·s±Æ¦C(¦pSheet1¤¤ªº¥kÃä¨Ò¤l)¡A¦A¤TÁÂÁÂ!
«ü©w®É¬q:
9:14, 12:59, 16:59 ³o3­Ó®É¬qªº"Open"¼Æ­È¨ú¥N¤U¤@­Ó®É¬q9:15, 13:00, 17:00ªº"Open"¼Æ­È
16:15, 12:00, 23:00 ³o3­Ó®É¬qªº"Close"¼Æ­È¨ú¥N¤W¤@­Ó®É¬q16:14, 11:59, 22:59ªº"Close"¼Æ­È

TOP

¦^´_ 11# donod
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng(1 To 3) As Range, i  As Integer, Ar(), S
  4.     Set Rng(1) = Sheets("Sheet1").Range("b:b")
  5.     Ar = Array(#9:14:00 AM#, #12:59:00 PM#, #4:59:00 PM#, #4:15:00 PM#, #12:00:00 PM#, #11:00:00 PM#)
  6.     For i = 0 To UBound(Ar)
  7.         Set Rng(2) = Rng(1).Find(Ar(i), LookIn:=xlFormulas)
  8.         If Not Rng(2) Is Nothing Then
  9.             S = Rng(2).Address
  10.             Do
  11.                 If i <= Int(UBound(Ar) / 2) Then
  12.                     Rng(2).Offset(1, 1) = Rng(2).Offset(, 1)
  13.                 Else
  14.                     Rng(2).Offset(-1, 4) = Rng(2).Offset(, 4)
  15.                 End If
  16.                 If Not Rng(3) Is Nothing Then
  17.                     Set Rng(3) = Union(Rng(3), Rng(1).Parent.Range(Rng(1).Parent.Cells(Rng(2).Row, "a"), Rng(1).Parent.Cells(Rng(2).Row, "g")))
  18.                 Else
  19.                     Set Rng(3) = Rng(1).Parent.Range(Rng(1).Parent.Cells(Rng(2).Row, "a"), Rng(1).Parent.Cells(Rng(2).Row, "g"))
  20.                 End If
  21.                 Set Rng(2) = Rng(1).FindNext(Rng(2))
  22.             Loop Until S = Rng(2).Address
  23.         End If
  24.     Next
  25.      If Not Rng(3) Is Nothing Then Rng(3).Delete
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 12# GBKEE
­n·PÁªº¤Ó¦h¤F!·PÁÂGEKEEª©¤j±Ð¾É!

TOP

¦A½Ð±Ð¦p¦ó±NBÄ檺®É¶¡¦Û°Ê¼W¥[1¤ÀÄÁ(e.g. 9:15Âର9:16)
¤§«á¦bHÄæÅã¥Ü¬ÛÃöDate Code(e.g. 5130916 ¥Nªí5¤ë13¤é9:16)
ÁÂÁÂ!
A1min.rar (140.66 KB)

TOP

¦^´_ 14# donod
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim D As Variant, E As Range
  4.     For Each E In Range("b2", [b2].End(xlDown))
  5.         D = Split(E.Offset(, -1), "/")
  6.         E.Value = E + #12:01:00 AM#
  7.         E.Offset(, 6) = D(0) & D(1) & Replace(E.Text, ":", "")
  8.     Next
  9. End Sub
½Æ»s¥N½X
ÁÙ¬O
  1. Sub Ex1()
  2.     Dim D As Variant, E As Range, b As Date
  3.     For Each E In Range("b2", [b2].End(xlDown))
  4.         b = E + #12:01:00 AM#
  5.         D = Split(E.Offset(, -1), "/")
  6.         E.Offset(, 6) = D(0) & D(1) & Application.Text(b, "hhmm")
  7.     Next
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 15# GBKEE
¸ò±qGBKEEª©¤jªº«ü¾É¡A¦¨¥\¤F!¦A¤T·PÁÂ!
  1. Option Explicit

  2. Sub Ex()

  3.     Dim D As Variant, E As Range, b As Date

  4.     For Each E In Range("b2", [b2].End(xlDown))

  5.         D = Split(E.Offset(, -1), "/")
  6.         
  7.         b = E + #12:01:00 AM#

  8.         E.Value = E + #12:01:00 AM#

  9.         'E.Offset(, 6) = D(0) & D(1) & Replace(E.Text, ":", "")
  10.          E.Offset(, 6) = D(0) & D(1) & Application.Text(b, "hhmm")

  11.     Next

  12. End Sub
½Æ»s¥N½X

TOP

½Ð°Ý¦pªG­n³B²zªºÀÉ®×A.xls¤w¸g¥´¶}¡A¥H¤WªºVBAÀɮצbB.xlsm¡A¦p¦ó¼g¤~¯à¹ïA.xls§@¦Û°ÊÅÜ°Ê¡AÁÂÁÂ!

TOP

³o­Ó¤£¦æ
  1. Sub Ex()



  2.     Dim D As Variant, E As Range, b As Date
  3.   
  4.     Windows("A.xls").Activate
  5.     Sheets("Sheet1").Select
  6.       
  7.     With ActiveWorkbook.Sheets(1)
  8.    
  9.    
  10.         For Each E In Range("b1", [b1].End(xlDown))

  11.           D = Split(E.Offset(, -1), "/")
  12.         
  13.           b = E + #12:01:00 AM#

  14.           E.Value = E + #12:01:00 AM#

  15.           E.Offset(, 6) = D(0) & D(1) & Application.Text(b, "hhmm")

  16.         Next
  17.    
  18.    
  19.     End With

  20. End Sub
½Æ»s¥N½X
B.rar (11.78 KB)

TOP

¦^´_ 18# donod
  1. Option Explicit
  2. Sub Ex()
  3.     Dim D As Variant, E As Range, b As Date
  4.     With Workbooks("A.xls").Sheets("Sheet1")
  5.         For Each E In .Range("b2", .[b2].End(xlDown))
  6.             D = Split(E.Offset(, -1), "/")
  7.             b = E + #12:01:00 AM#
  8.             E.Value = E + #12:01:00 AM#
  9.             E.Offset(, 6) = D(0) & D(1) & Application.Text(b, "hhmm")
  10.         Next
  11.     End With
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 19# GBKEE
©ú¥Õ¤F¡A·PÁÂGBKEEª©¤j±Ð¾É!

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