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

[µo°Ý] ®æ¦¡³]©w ?

[µo°Ý] ®æ¦¡³]©w ?

¥»©«³Ì«á¥Ñ t8899 ©ó 2022-8-10 06:33 ½s¿è

½Ð±Ð®æ¦¡³]©w
#,##0.??;[¬õ¦â]-##,#?0.??
³o­Ó®æ¦¡¡A§Ú¿é¤J123¡A·|Åã¥Ü 123.  , ¦h¤@­Ó"."
§Ú­nªº¬O¦pªG§Ú¿é¤J123.1, ´NÅã¥Ü123.1 , ¿é¤J123´NÅã¥Ü123,¥t¥~¤]­n¦³¤d¦ì²Å¸¹","
®æ¦¡¤£ª¾¦p¦ó³]©w?
³q¥Î®æ¦¡¥i¥H¸Ñ¨M¦ý¬OµLªkÅã¥Ü¥a¦ì²Å¸¹"," ??

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2022-8-11 11:51 ½s¿è

¦^´_ 1# t8899


   
¤£Åã¥Ü¾ã¼Æ«á¤èªº "." ¨Ãºû«ù¦U­Ó¦ì¼Æ¹ï»ô
1.«öTEST«ö¶s
2.°õ¦æ«á¥Ñ©óÅܤƫܤp! »Ý¬d¬Ý¦³©³¦âªºÀx¦s®æ
3.ÁקK¼vÅT¨ä¥¦®æ¦¡ªºÀx¦s®æ! ®æ¦¡³]©w¬°¥H¤U¨âºØªº¤~·|³QÅܧó®æ¦¡ ©Î ¥æ´«Åܧó®æ¦¡
A.         #,##0.??;[¬õ¦â]-##,#?0.??
B.         #,###_._0_0;[¬õ¦â]-#,###_._0_0

PS:®æ¦¡³]©wªº§e²{µ²ªG³Ì¦n»P­ì­È¬Û¦P!§_«h¦³¥ØµøªºÀ³¥Î»~®t!

20220811.zip (16.58 KB)

Option Explicit
Sub TEST()
Dim Ar As Range, a  As Range, NF1, NF2
NF1 = "#,###_._0_0;[¬õ¦â]-#,###_._0_0"
NF2 = "#,##0.??;[¬õ¦â]-##,#?0.??"
Set Ar = Cells
For Each a In Ar.SpecialCells(2)
   If a.NumberFormatLocal = NF1 Or a.NumberFormatLocal = NF2 Then
      If a Like "*#" = True And a Like "*.*" = False Then
         a.NumberFormatLocal = NF1
         ElseIf a Like "*#.#*" Then
            a.NumberFormatLocal = NF2
      End If
   End If
Next
End Sub

TOP

¦^´_ 2# Andy2483
ÁÂÁ«ü¾É¡A³o³]©w¤@­n¥Î¥¨¶°¸Ñ¨M??

TOP

¦^´_ 3# t8899
1.«e½úªº³o©«Åý«á¾Ç¾Ç¨ì¤£¤ÖÃö©ó®æ¦¡³]©wªºª¾ÃÑ¡IÁÂÁ«e½ú
2.«á¾Ç²q´ú«e½úªº»Ý¨D,·Q¨ì³o¤èªk,¼È®É§ä¤£¨ì¨ä¥¦ªº¤èªk
3.¦pªG«á½úªºVBA¤èªk²Å¦X«e½úªº»Ý¨D,«á¾Ç¤]·Qª¾¹D¦³¨S¦³§ó²³æªº¤èªk¡I©ß¿j¤Þ¥É¡I½Ð¦U¦ì«e½ú¦A«ü¾É¡I

TOP

¦^´_ 3# t8899


    ³o¼Ë¶Ü?
¥Î2­Ó®æ¦¡¤Æ±ø¥ó¸Õ¸Õ



Image 3.png


²Ä¤@­Ó
¤½¦¡ =$A1=INT($A1)
®æ¦¡¥Î¿ïªº






²Ä¤G­Ó
¤½¦¡ =$A1<>INT($A1)
®æ¦¡  #,##0.??;[¬õ¦â]-##,#?0.??



TOP

¦^´_ 5# quickfixer
l½T¹ê¼F®`¡A§Ú¨S·Q¨ì¥Î±ø¥ó®æ¦¡¤Æ¸Ñ¨M

TOP

¦^´_ 5# quickfixer


    ·PÁ«e½ú«ü¾É!
«á½úªì¨B»{ÃÑ ¦p¦ó±NÀx¦s®æ¦Û¨­¤º®e¥Î¦h±ø¥ó(¤½¦¡)±±¨îÀx¦s®æ®æ¦¡!
ÁÂÁÂ!

TOP

        ÀR«ä¦Û¦b : ¤£­nÀH¤ß©Ò±ý¡A­nÀH¤ß±Ð¨|¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD