¨â²Õ¼ÆÈ¥h°£«½Æªº¸ê®Æ«á±Æ§Ç
- ©«¤l
- 17
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 71
- ÂI¦W
- 1
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- google
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-6-27
- ³Ì«áµn¿ý
- 2024-11-18
|
¨â²Õ¼ÆÈ¥h°£«½Æªº¸ê®Æ«á±Æ§Ç
¥»©«³Ì«á¥Ñ henry860608 ©ó 2023-3-19 20:31 ½s¿è
¤wª¾A¡BB¨â¦C¦³¨â²Õ¼ÆÈ¡A·Qn³z¹L¤½¦¡±N¨â²Õ¼ÆȦ³«½Æªº³¡¤À¥h°£¡A¨Ã±N¸ê®Æ¨Ì¼ÆȤj¤p±Æ§Ç(¦p¤U±C¦C)
A B
1 1
3 4
6 7
9 9
12 10
15 14
18 16
21 18
24 22
27 37
30 46
33 57
36 80
C
1
3
4
6
7
9
10
12
14
15
16
18
21
22
24
27
30
33
36
37
46
57
80 |
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 17
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 71
- ÂI¦W
- 1
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- google
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-6-27
- ³Ì«áµn¿ý
- 2024-11-18
|
¦^´_ 11# Andy2483
¦n³á¡Aµ¥¤pªº°Ñ¦Ò¨ä¥L¤j¦Ñªº¤èªk«á´N·|¶Ç¤W¨Óµ¹¦U¦ì°Ñ¦Ò |
|
|
|
|
|
|
- ©«¤l
- 17
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 71
- ÂI¦W
- 1
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- google
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-6-27
- ³Ì«áµn¿ý
- 2024-11-18
|
¦^´_ 11# Andy2483
¦n³á¡Aµ¥¤pªº°Ñ¦Ò¨ä¥L¤j¦Ñªº¤èªk«á´N·|¶Ç¤W¨Óµ¹¦U¦ì°Ñ¦Ò |
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 9# quickfixer
¦^´_ 10# singo1232001
ÁÂÁ½׾Â,ÁÂÁ«e½ú«ü¾É
«ÝÀ³¥Îªº¾÷·|¨Ï¥Î,ÁÂÁ |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 354
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 387
- ÂI¦W
- 0
- §@·~¨t²Î
- windows7
- ³nÅ骩¥»
- vba,vb,excel2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-1-8
- ³Ì«áµn¿ý
- 2024-8-2
|
¥»©«³Ì«á¥Ñ singo1232001 ©ó 2023-3-21 23:16 ½s¿è
¦^´_ 7# henry860608
ÕY¨S¾Ç¹LSQL ¥i¥Hª½±µ¸õ¹L ¨Ï¥Î¨ä¥L¤j¤jªº¸Ñªk¤ñ¸û¤è«K ¾Ç²ß¸ô½u¤]¤ñ¸û¥¿³W
¥t¥~¨Ï¥Î¦¹¤èªk³£»Ýn¦w¸Ë .Framework 3.5
¥]¬Aq¤jªºarraylist
¥H¤U¸ÑÄÀqȤ¤,SQL»yªk¸ÑÄÀ
select distinct a from
(select a as a from [¤u§@ªí1$A1:A]
union all
select b as a from [¤u§@ªí1$B1:B] )
order by a
1.
Àò¨ú¤u§@ªí1¤¤ªºAÄæ¸ê®Æ
select a as a from [¤u§@ªí1$A1:A]
¦X¨Ö
union all
¤u§@ªí1¤¤ªºBÄæ¸ê®Æ
select b as a from [¤u§@ªí1$B1:B]
2.
select distinct a from '±N1.³¡¤ÀÀò¨ú¾ã²z¦nªº¸ê®Æ distinct¥h«
(select a as a from [¤u§@ªí1$A1:A]
union all
select b as a from [¤u§@ªí1$B1:B] )
order by a '¨Ã¥Border by±Æ§Ç
Y§A¹ïSQL¦³¿³½ì ±q2019¦~«á,§K¶Oºô¸ô½Òµ{«D±`¦h ¤×¨äB¯¸¤W ±q¹s¶}©l¾Ç ¤j·§2~3Ó¤ë´N¥i¥H
¯u¥¿·N¸q¤W¨Ã¤£¬O®³¨Óµ¹excel³æ¿W¥Îªº
¥u¤£¹Lè¦n¥i¥H®³vba°V½m»yªk ¹ê»Ú¥Î¦bSQL server »Pvba¤W
±¹ï²{¹êªº°ªt²ü³õ´º,¶W¹L30000µ§¥H¤Wªº¸ê®Æ ©ÎªÌ¦hªí¾ã¦X ´N¬OSQLªº¸nªù
¤×¨ä¦b¤ººô¤¤ ¦h¥x¹q¸£ ¶i¾P¦s ©ÎªÌ±µª¦ÂΤW³£¦³«Ü±j¤jªº«K§Q©Ê ¦Ó¥B¤£¥Î¾á¤ß ¸ê®Æ½s½X²§±` ¤ñ¦p"温" "羣" ³oÃþexcel ·|²§±`ªº¤å¦r
·íµM¥¼¨Ó¤]¯à¹B¥Î¨ìptSQL ©ÎªÌMySQL |
|
|
|
|
|
|
- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 30
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 8# Andy2483
¨Ò¦pactivex combobox
Sheets("¤u§@ªí1").ComboBox1.List = arr.toarray
Sheets("¤u§@ªí1").ComboBox1.ListIndex = 0
|
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¦^´_ 6# quickfixer
ÁÂÁ«e½ú
³o¤èªk¨S¦³±Nȼg¤JÀx¦s®æ´N¥i±Æ§Ç,Y¥Î©ó¦Ûqªí³æ¤¤²M³æ©ú²Óªº¦¬¶°¤£«½Æ«á±Æ§Ç,¦n¹³«Ü¤è«K |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 17
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 71
- ÂI¦W
- 1
- §@·~¨t²Î
- window
- ³nÅ骩¥»
- google
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2017-6-27
- ³Ì«áµn¿ý
- 2024-11-18
|
¦^´_ 4# singo1232001
¤£¦n·N«ä¤j¤j¡A¥i¥H°Ý¤@¤U³o¥|¦æ¬O¬Æ»ò·N«ä?
¤p§Ì¹ïSQL¯AÂy²LÁ¡- q = "select a as a from [¤u§@ªí1$A1:A] " & vbCrLf & " union all "
- q = q & vbCrLf & " select b as a from [¤u§@ªí1$B1:B]"
- q = "select distinct a from (" & q & ") order by a "
- s.Range("d2").CopyFromRecordset .Execute(q)
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 30
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 1# henry860608
Sub test()
Dim arr As Object, brr As Variant
Set arr = CreateObject("System.Collections.ArrayList")
brr = Range("A1:B" & Cells(Rows.Count, "A").End(xlUp).Row)
For Each n In brr
If n <> vbNullString And Not arr.contains(n) Then arr.Add (n)
Next
arr.Sort
Range("c1:c" & arr.Count) = Application.Transpose(arr.toarray)
End Sub |
|
|
|
|
|
|