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

[µo°Ý] ¸¨ÂI°ÝÃD....(§Ú¥Ø«e±q¥¼¨ì¹Lªº»â°ì)

[µo°Ý] ¸¨ÂI°ÝÃD....(§Ú¥Ø«e±q¥¼¨ì¹Lªº»â°ì)

¥»©«³Ì«á¥Ñ ui123 ©ó 2013-11-11 19:48 ½s¿è

¤µ¤Ñ§Ú¸ò¦P¨Æ2¤H¦b¦Y¶º®É¡A¦P¨Æ¸ò§Ú°Q½×¤F¤U­±ªº°ÝÃD:


---------------------------------------------------------------------------------------

§Ú¦P¨Æ»¡:¥DºÞ³Ìªñ¥X¤F­Ó¶WÃøÃDµ¹¦o¡AÃD¥Ø¦pªþ¥ó¡AµM«á´N¥á¤F«Ü¦hdata½Ð¦o¤ÀÃþ

                   ¤j·§1000µ§¥ª¥k(X,y¶bÂI......"§ó®£©Æªº¨Æ" ¬O¤£¤@©w¬O¾ã¼Æ¡AÁÙ¦³¤p¼ÆÂIªº)

¦o»¡¡A¦o«Ü²Â¡A¥u·|¤@µ§¤@µ§¹ï¦b­þ¤@­Ó°Ï°ì¡A´N³o¼Ë¤@ª½¹ï¤U¥h......µM«á§Ú¤]À°¦o¹ï¤F«Ü¤[

§Ú¥u·|¥¿¤è§Î°Ï°ìµM«á¥Îif ....¦ý³o¦ü¥G¦æ¤£³q~¤µ¤Ñ¥[¤F¤@ÂI¯Z«á²×©ó§¹¦¨¤F  ^^~¶}¤ß

---------------------------------------------------------------------------------------


¥Ø«e¤]¥u¯à³o¼Ë~

¦pªG¤j®a¹J¨ì¸ò§Ú¤@¼Ëªºª¬ªp·|«ç»ò¼Ë©O?

ªþ¥ó¦p¤U:
¸¨ÂI°ÝÃD.rar (9.35 KB)

¦^´_ 21# stillfish00


    ¦]¬°Åv­­¤£¨¬, µLªk¨p°T. ¦ýÁÙ¬O­n¯S¦a¨Ó³o¸Ì·PÁ stillfish00 ¤j¤j.  ¥Î³o¬qµ{¦¡¥Î¸g½n«×¸ò google map ªº®y¼Ð¹Ï·f°t¤§«á, ´N¥i¥H¥ÎVBA¨Ó§PÂ_©Ð«Îªº®y¸¨ÂI, ¤Q¤À¦n¥Î.  ÁÂÁÂ.

TOP

¦^´_ 20# stillfish00
stillfish00¤j~ ¸Õ¹L¡A¦¨¥\~ µ¹§A©ç©ç¤â
«D±`§¹¬üªºµ²ªG¡A¦n¼F®`¡A­ì¥»¯uªº¥H¬°¥ÎVBAÀ³¸Ó¸Ñ¤£¥X¨Ó¡Aµ²ªG"³ºµM³Q¸Ñ¥X¨Ó¤F!"
¶W±jªº¡A¯uªº«D±`ÁÂÁ§A¡A¯¬§A¤u§@¶W¶¶§Q  \(^0^)/

P.S.ÁÙ¦³ÁÂÁ°ѻPªºML089¤j¡A¦]¬°¦³§Aªº°Ñ»P¡A©Ò¥H³o­Ó¤å³¹¦³¤F¦h¤H°Q½×ªº·Pı¡A¤£·|Åã±o³o»ò©t³æ~ÁÂÁ§A^^

TOP

¦^´_ 19# ui123
A°Ï­±¿n =PolyArea(C4:D8)
³o¥u¬OML089¤j¦b10¼Ó­n§Ú¥t¥~À°¦£¼gªººâ­±¿nªº¨ç¼Æ¡C

TOP

¦^´_ 19# ui123
­×§ï¦p¤U¡A¥i§tÃä¤WªºÂI¡A¦³Àu¥ý¶¶§Ç(¾a«eªºÀu¥ý)
°Ï°ì¤£­­ABC¤T°Ï¥i¦b°Ñ¼Æ¦Û¦æ¼W¥[¡A¦ý­n¨Ì°Ñ¼Æ¶¶§Ç¡C
  1. Function pointInPoly(ptx As Double, pty As Double, arPoly) As Boolean
  2.     Dim i As Long, j As Long
  3.     Dim pix As Double, piy As Double
  4.     Dim pjx As Double, pjy As Double
  5.    
  6.     For i = 1 To UBound(arPoly) - 1
  7.         j = i + 1
  8.         pix = arPoly(i, 1): piy = arPoly(i, 2)
  9.         pjx = arPoly(j, 1): pjy = arPoly(j, 2)
  10.         
  11.         '¦hÃä§ÎÃä¤W
  12.         If (pix - ptx) * (pjy - pty) - (piy - pty) * (pjx - ptx) = 0 And _
  13.             (pix - ptx) * (pjx - ptx) + (piy - pty) * (pjy - pty) <= 0 Then _
  14.         pointInPoly = True: Exit Function
  15.         
  16.         '¦hÃä§Î¤º³¡
  17.         If Not (piy > pty) = (pjy > pty) Then
  18.             If ptx < (pjx - pix) * (pty - piy) / (pjy - piy) + pix Then pointInPoly = Not pointInPoly
  19.         End If
  20.     Next
  21. End Function

  22. Function RegionABC(x As Double, y As Double, ParamArray polyRegion())
  23.     '3rd°Ñ¼Æ¬°A°Ï¡A4th°Ñ¼Æ¬°B°Ï¡C¡C¡C¨Ì¦¹Ãþ±À¡A¶V¾a«eªºÀu¥ý¡C
  24.     Dim i As Long, arPoly
  25.         
  26.     For i = LBound(polyRegion) To UBound(polyRegion)
  27.         arPoly = polyRegion(i).Value
  28.         
  29.         If UBound(arPoly, 2) <> 2 _
  30.             Or arPoly(1, 1) <> arPoly(UBound(arPoly), 1) _
  31.             Or arPoly(1, 2) <> arPoly(UBound(arPoly), 2) Then RegionABC = CVErr(xlErrRef): Exit Function
  32.         
  33.         If pointInPoly(x, y, arPoly) Then
  34.             RegionABC = Chr(65 + i - LBound(polyRegion))    '¨Ì¶¶¦ìÅã¥ÜA¡AB¡AC¡AD
  35.             Exit Function
  36.         End If
  37.     Next i
  38.     RegionABC = "¤£¦b½d³ò¤º"
  39. End Function
½Æ»s¥N½X

TOP

¦^´_ 12# stillfish00

Ãö©ó­è­èªº°ÝÃD for stillfish00¤j ¤ÎML089¤j

1)¥]§tÂI¦bABCÃä½t½u¤W«ç»ò¿ì?(±Ä¨ú¦pªG­è¦n¦b­«Å|ªº½u¤W¡A¨ú¸û¤p¨º¤@­Ó(A<B<C)¡A¨Ò¦p¡A­è¦n¦bA°Ï¤ÎB°Ï¥æ±µ½u¤W¡AºâA°Ïªº)
    Ans:­«Å|½u¤W¡A·|§P¬Ò¨S¦AABC°Ï¤W

2)³o­Ó¥i¥H¥Î¦b¦hÃä§Î¶Ü? ¦³¨Ç"¤£³W«hªº¦hÃä§Î"©O?
    Ans:"À³¥Î©Ê«D±`¼s"¡A¥B¥i¥H¹ï¥ô¦ó¦hÃä§ÎµL­­¼W¥[°Ï°ì~¶W¯Å¼F®`

3)ÁÙ¬O¤£À´ A°Ï­±¿n =PolyArea(C4:D8) ¬O­n°µ¤°»ò?
    Ans:ÁÙ¬O¤£À´³o­n°µ¤°»ò @@ ¥i¥H¸Ñ»¡¤@¤U¥\¯à¶Ü? ·P®¦

stillfish00¤j¡A¥i¥H·Q¥X§P­«Å|½u¶Ü?
¯ÊÁ{ªù¤@¸}¤F!
¦pªG­«Å|½u¥i§P¥X¡A´N«D±`"§¹¬ü¤F"¡A¤£µM·|º|§P±¼«Ü¦h½u¤WÂI~
­è­è¨Ï¥Î¤ß±o¡A¶W¹ê¥Î ¦A¦¸ÁÂÁ  stillfish00¤j

TOP

¦^´_ 12# stillfish00
¦¨¥\¤F¡A§P©w¥XABC°Ï¤F ~Ya^^   ÁÂÁÂstillfish00¤j ¤ÎML089¤j

°Ý¤@¤Ustillfish00¤j ¤ÎML089¤j
1)¥]§tÂI¦bABCÃä½t½u¤W«ç»ò¿ì?(±Ä¨ú¦pªG­è¦n¦b­«Å|ªº½u¤W¡A¨ú¸û¤p¨º¤@­Ó(A<B<C)¡A¨Ò¦p¡A­è¦n¦bA°Ï¤ÎB°Ï¥æ±µ½u¤W¡AºâA°Ïªº)
2)³o­Ó¥i¥H¥Î¦b¦hÃä§Î¶Ü? ¦³¨Ç"¤£³W«hªº¦hÃä§Î"©O?
3)ÁÙ¬O¤£À´ A°Ï­±¿n =PolyArea(C4:D8) ¬O­n°µ¤°»ò?
·PÁ¸U¤À<(_ _)>

TOP

¦^´_ 16# ML089

ML089 ¤j~  O4 Àx¦s©M¤U­±ªº¤½¦¡«ç»ò¶ñ¡AµLªk§P¥XABC°Ï???¡A«ô°UÀ°§Ú¬Ý¤@¤U¡AÁÂÁ§A^^
¤½¦¡¤w©ñ¦b¸Ì­±¤F¡A¦pªþ¥ó(1¤p®É¦^´_3¦¸¥Î¥ú¤F :'( )
¸¨ÂI°ÝÃD_§PÂ_¨Ò¤l_try2.rar (18.36 KB)

TOP

¦^´_ 15# ui123

µ{¦¡©ñ¦b Module1
A°Ï­±¿n =PolyArea(C4:D8)
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

b]¦^´_ 12# stillfish00

stillfish00 ¤j±z¦n¡A§Ú­è­è¥Î¤F¤@¤U§Aªº¦Û­q¨ç¼Æ(²Ä¤@¦¸¥Î³o­Ó)
¦ý§Ú¤£ª¾¹D«ç»ò¥Î¡A¨º­Ó¨ç¼Æ¨S¦³»¡©ú?! µLªk§P¥X¡A¦pªþ¥ó¡A«ô°U±Ð±Ð§Ú<(_ _)>
ÁÙ¬O¦³¨ä¥L¤H·|¥Î¤F? ML089¤j?  ·P®¦~
P.S.§ÚÁÙµLªk¤U¸üÀÉ®×

¸¨ÂI°ÝÃD_§PÂ_¨Ò¤l_.rar (17.73 KB)

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD