2018-12-01ãã1ã¶æéã®è¨äºä¸è¦§
ã¯ã©ã¹ãå®ä½åãããã¨ã®æ¯å©ã¨ãã¦ããããç¼ãã®åãã¨ãããç¼ããã®è©±ããã°ãã°ç¨ãããã¾ããããããã®æ¯å©ã§ããªãã»ã©ï¼ããã ã£ãã®ããã¨ä¸çºã§ç解ã§ãã人ã¯ä½äººããã®ã§ããããï¼åãéãããè²ã ãªè§åº¦ããèããå·¡ããã¦ç解ã«è³ã£ã人ãâ¦
ãVBAã§ãéããã¾ã¾ã®ããã¯ãããã¼ã¿ã転è¨ããæ¹æ³ã¯ç¡ããã«ãã¼ãã¨æã£ã¦ãã人ã®ããã«ãä»å㯠ExecuteExcel4Macro ã¡ã½ãããç´¹ä»ãã¾ãã ExecuteExcel4Macroï¼ ããã¯ä½ãã®æå 端æè¡ã§ããï¼ ãããéãã¾ãã æ°ãããã¼ã¸ã§ã³ã® Excel ã§ã â¦
VBAã§ã¯æååãã¼ã¿ã®æ¯è¼æ¹æ³ã以ä¸ã® Option Compare ã¹ãã¼ãã¡ã³ãã§å®£è¨ãããã¨ãã§ãã¾ãã Option Compare Binaryï¼åã¯çç¥ï¼ åæååã®æåã³ã¼ãæ°å¤ãæ¯è¼ããã¾ãã Option Compare Text ã·ã¹ãã ã®ãã±ã¼ã«ã«ãã£ã¦æ±ºå®ãããèªå½çæå³ã«åºâ¦
VBA ã§ã¯RegExpã¯ã©ã¹ãå©ç¨ããã°æ£è¦è¡¨ç¾ã使ç¨ãããã¨ãã§ãã¾ããããããã¾ã§ããªãã¨ã Likeæ¼ç®åã使ã£ã¦æ£è¦è¡¨ç¾ã®ãããªãã¿ã¼ã³ãããã³ã°ããããã¨ãã§ãã¾ãã è¦ãããã¨ãå°ãªãã®ã§åå¿è ã«ã¯ãªã¹ã¹ã¡ã§ãããçµã¿åãã次第ã§ã¯ãããªãâ¦
ä»å㯠Word ã® Range ã«ã¤ãã¦ã§ãã ååãåãã§ç¨éãä¼¼ã¦ãã¾ãããExcelã® Range ã¨ã¯ããã°ã©ã ä¸ã¾ã£ããã®å¥ç©ã§ãã Range ã®å¼æ°ã¯ã¯ã¤ãã¯ãã³ãã«è¡¨ç¤ºãããããã« Startï¼éå§æåä½ç½®Endï¼çµäºæåä½ç½® ã§æå®ãã¾ãã ä¸ã®ãµã³ãã«ã§å®éã«â¦
ä¹ ãã¶ãã«ã³ã¼ããæ¸ãã¨ãRangeã®å¼æ°ã§:ï¼ã³ãã³ï¼ã使ãã°è¯ãã®ã,ï¼ã«ã³ãï¼ã使ãã°è¯ãã®ãè¿·ã£ã¦ãã¾ãæãããã¾ã(ï¼ _ï¼ ;)ãªã®ã§ãèªåã®è³å æ´çã試ã¿ããã¨æãã¾ãã Rangeã®å¼æ°ã¯ Range(å¼æ°1,å¼æ°2) ã®ããã«2ã¤ã¾ã§æå®ãããã¨ãã§ãã¾â¦