{"id":3683,"date":"2023-09-01T08:07:06","date_gmt":"2023-09-01T08:07:06","guid":{"rendered":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/"},"modified":"2023-12-07T05:06:10","modified_gmt":"2023-12-07T05:06:10","slug":"%e3%82%bb%e3%83%ab%e5%80%a4","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/","title":{"rendered":"Vba\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?"},"content":{"rendered":"<div class=\"excel-\" id=\"excel-3020234861\"><script type=\"text\/javascript\">\r\n\tatOptions = {\r\n\t\t'key' : 'c1158f160081d6540a8409e6925dab94',\r\n\t\t'format' : 'iframe',\r\n\t\t'height' : 250,\r\n\t\t'width' : 300,\r\n\t\t'params' : {}\r\n\t};\r\n<\/script>\r\n<script type=\"text\/javascript\" src=\"\/\/www.highperformanceformat.com\/c1158f160081d6540a8409e6925dab94\/invoke.js\"><\/script><\/div> <p class=\"wp-block-heading\"><strong>\u91cd\u8981\u306a\u30e1\u30e2<\/strong><\/p><ul><li>value \u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u4e21\u65b9\u5411\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059 (\u30bb\u30eb\u304b\u3089\u5024\u3092\u8aad\u307f\u66f8\u304d\u3067\u304d\u307e\u3059)\u3002<\/li><li> <a href=\"https:\/\/exceladvisor.org\/ja\/\u7bc4\u56f21\/\">Cells \u3068 Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u3092\u53c2\u7167\u3057\u3001<\/a>\u30bb\u30eb\u306e\u5024\u3092\u8a2d\u5b9a (\u53d6\u5f97\u304a\u3088\u3073\u7de8\u96c6\u3082\u53ef\u80fd) \u3067\u304d\u307e\u3059\u3002<\/li><\/ul><h2 class=\"wp-block-heading\">\u30bb\u30eb\u5024\u3092\u8a2d\u5b9a\u3059\u308b<\/h2><p>\u30bb\u30eb\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u300cValue\u300d\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u3057\u3066\u304b\u3089\u3001\u8a2d\u5b9a\u3057\u305f\u3044\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u3044\u304f\u3064\u304b\u306e\u4f8b\u3092\u4f7f\u7528\u3057\u307e\u3057\u305f\u3002<\/p><h3 class=\"wp-block-heading\"> 1. \u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3057\u307e\u3059<\/h3><p>\u30bb\u30eb A1 \u306b\u300c\u5b8c\u4e86\u300d\u3068\u3044\u3046\u5024\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 <\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\").Value = \"Done\"<\/code><\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51319\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u30bb\u30eb\u5024\u306e\u8a2d\u5b9a\" width=\"311\" height=\"148\"><\/figure><\/div><p>\u3054\u89a7\u306e\u3068\u304a\u308a\u3001\u6700\u521d\u306b\u5024\u3092\u8ffd\u52a0\u3059\u308b\u30bb\u30eb\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u8a2d\u5b9a\u3057\u3001\u6b21\u306b value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u6700\u5f8c\u306b\u3001\u4e8c\u91cd\u5f15\u7528\u7b26\u3067\u56f2\u3093\u3060\u7b49\u53f7\u300c=\u300d\u3092\u4f7f\u7528\u3057\u3066\u5024\u300cDone\u300d\u3092\u5272\u308a\u5f53\u3066\u307e\u3057\u305f\u3002<\/p><p>\u6b21\u306e\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306b\u3001\u300cCells\u300d\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Cells(1, 1).Value = \"Done\"<\/code><\/pre><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u30bb\u30eb A1 \u3082\u53c2\u7167\u3057\u3066\u3044\u307e\u3059\u3002<\/p><p>\u3053\u308c\u3068\u306f\u5225\u306b\u3001value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u305b\u305a\u306b\u30bb\u30eb\u306b\u5024\u3092\u76f4\u63a5\u5272\u308a\u5f53\u3066\u308b\u65b9\u6cd5\u3082\u3042\u308a\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Cells(1, 1) = \"Done\"<\/code><\/pre><p>\u305f\u3060\u3057\u3001\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p><p>\u3053\u3053\u3067\u3001\u30bb\u30eb\u306b\u6570\u5024\u3092\u5165\u529b\u3059\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u4e8c\u91cd\u5f15\u7528\u7b26\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6b21\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\") = 99<\/code><\/pre><p>\u307e\u305f\u3001 <a href=\"https:\/\/exceladvisor.org\/ja\/\u65e5\u4ed82\/\">DATE<\/a>\u304a\u3088\u3073<a href=\"https:\/\/exceladvisor.org\/ja\/\u4eca\/\">NOW<\/a> ( <a href=\"https:\/\/exceladvisor.org\/ja\/\u6a5f\u80fd\/\">VBA \u95a2\u6570<\/a>) \u3092\u4f7f\u7528\u3057\u3066\u3001VBA \u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u65e5\u4ed8\u307e\u305f\u306f\u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u3092\u5165\u529b\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\").Value = Date Range(\"A2\").Value = Now<\/code><\/pre><p>\u30a2\u30af\u30c6\u30a3\u30d6 \u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u5834\u5408\u3001\u5fc5\u8981\u306a\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">ActiveCell.Value = Date<\/code><\/pre><h3 class=\"wp-block-heading\"> 2. \u5165\u529b\u30dc\u30c3\u30af\u30b9\u306e\u4f7f\u7528<\/h3><p>\u30e6\u30fc\u30b6\u30fc\u306b\u30bb\u30eb\u306b\u5165\u529b\u3059\u308b\u5024\u3092\u6307\u5b9a\u3057\u3066\u3082\u3089\u3044\u305f\u3044\u5834\u5408\u306f\u3001\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u30bb\u30eb A1 \u306b\u5024\u3092\u5165\u529b\u3059\u308b\u3068\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51320\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/2-utiliser-la-zone-de-saisie-pour-la-valeur.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5024\u306e\u5165\u529b\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3059\u308b\" width=\"496\" height=\"162\"><\/figure><\/div><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\").Value = _ InputBox(Prompt:=\"Type the value you want enter in A1.\")<\/code><\/pre><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30bb\u30eb A1 \u306e\u5024\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u5165\u529b\u3057\u305f\u5024\u3092\u8fd4\u3059\u5165\u529b\u30dc\u30c3\u30af\u30b9\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b\u5024\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\"> 3. \u5225\u306e\u30bb\u30eb\u304b\u3089<\/h3><p>\u5225\u306e\u30bb\u30eb\u306e\u5024\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u30bb\u30eb B1 \u304b\u3089\u30bb\u30eb A1 \u306b\u5024\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u30b3\u30fc\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 <\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\") = Range(\"B1\").Value<\/code><\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51321\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/3-definir-la-valeur-de-la-cellule-en-utilisant-la-valeur-dune-autre-cellule.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5225\u306e\u30bb\u30eb\u306e\u5024\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\" width=\"521\" height=\"303\"><\/figure><\/div><p> value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u305b\u305a\u306b\u30bb\u30eb B1 \u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\") = Range(\"B1\")<\/code><\/pre><h3 class=\"wp-block-heading\"> 4. \u5168\u7bc4\u56f2\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b<\/h3><p>\u5358\u4e00\u306e\u30bb\u30eb\u3067\u306f\u306a\u304f\u3001\u8907\u6570\u306e\u30bb\u30eb\u307e\u305f\u306f\u30bb\u30eb\u7bc4\u56f2\u306b\u5024\u3092\u5165\u529b\u3057\u305f\u3044\u3068\u60f3\u50cf\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u306e\u5834\u5408\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1:A10\").Value = Date Range(\"B1, B10\").Value = Now<\/code><\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51322\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/4-valeurs-de-consigne-dans-toute-la-plage.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5168\u7bc4\u56f2\u306e\u8a2d\u5b9a\u5024\" width=\"326\" height=\"162\"><\/figure><\/div><p>\u30b3\u30fc\u30c9\u306e\u6700\u521d\u306e\u884c\u306b\u306f\u30bb\u30eb A1 \u304b\u3089 A10 \u307e\u3067\u306e\u7bc4\u56f2\u5168\u4f53\u304c\u3042\u308a\u30012 \u884c\u76ee\u306b\u306f 2 \u3064\u306e\u30bb\u30eb B1 \u3068 B10 \u304c\u3042\u308a\u307e\u3059\u3002<\/p><h2 class=\"wp-block-heading\">\u30bb\u30eb\u5024\u3092\u53d6\u5f97\u3059\u308b<\/h2><p>\u5148\u307b\u3069\u8ff0\u3079\u305f\u3088\u3046\u306b\u3001\u540c\u3058 value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\"> 1. ActiveCell\u306e\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/h3><p>\u30a2\u30af\u30c6\u30a3\u30d6 \u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u3044\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">ActiveCell.Value = Range(\"A1\")<\/code><\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51323\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/5-obtenir-la-valeur-de-la-cellule.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u30bb\u30eb\u5024\u3092\u53d6\u5f97\u3059\u308b\" width=\"323\" height=\"150\"><\/figure><\/div><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30a2\u30af\u30c6\u30a3\u30d6 \u30bb\u30eb\u3067 value \u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u7528\u3057\u3001\u305d\u306e\u5024\u3092\u30bb\u30eb A1 \u306b\u5272\u308a\u5f53\u3066\u307e\u3057\u305f\u3002<\/p><h3 class=\"wp-block-heading\"> 2. \u5909\u6570\u3078\u306e\u4ee3\u5165<\/h3><p>\u30bb\u30eb\u304b\u3089\u5024\u3092\u53d6\u5f97\u3057\u3066\u3001\u305d\u308c\u3092<a href=\"https:\/\/exceladvisor.org\/ja\/\u5909\u6570\/\">\u5909\u6570<\/a>\u306b\u5272\u308a\u5f53\u3066\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51324\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/6-affecter-a-une-variable.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\" width=\"333\" height=\"171\"><\/figure><\/div><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306b\u306f\u3001<a href=\"https:\/\/exceladvisor.org\/ja\/\u5909\u6570\/\">\u30c7\u30fc\u30bf\u578b<\/a>\u3068\u3057\u3066 date \u3092\u6301\u3064\u5909\u6570\u300ci\u300d\u304c\u3042\u308a\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306e 2 \u884c\u76ee\u3067\u306f\u3001\u30bb\u30eb A1 \u306e\u5024\u304c\u5909\u6570\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002<\/p><h3 class=\"wp-block-heading\"> 3.MsgBox\u306b\u8868\u793a\u3059\u308b<\/h3><p>\u3053\u3053\u3067\u3001\u30e1\u30c3\u30bb\u30fc\u30b8 \u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb A1 \u306e\u5024\u3092\u8868\u793a\u3059\u308b\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 <\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">MsgBox Range(\"A1\").Value<\/code><\/pre><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51325\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/7-afficher-dans-une-msgbox.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u30e1\u30c3\u30bb\u30fc\u30b8\u30dc\u30c3\u30af\u30b9\u306b\u8868\u793a\u3059\u308b\" width=\"309\" height=\"163\"><\/figure><\/div><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3067\u306f\u3001\u30e1\u30c3\u30bb\u30fc\u30b8 \u30dc\u30c3\u30af\u30b9\u306f\u30bb\u30eb A1 \u304b\u3089\u5024\u3092\u53d6\u5f97\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u306b\u8868\u793a\u3057\u307e\u3059\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-51326\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/8-msgbox-prennent-de-la-valeur.png\" sizes=\"auto, \" srcset=\"\" alt=\"msgbox-take-value\" width=\"131\" height=\"155\"><\/figure><\/div><h2 class=\"wp-block-heading\">\u30bb\u30eb\u5024\u3092\u5909\u66f4\u3059\u308b<\/h2><p>\u30bb\u30eb\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u3053\u308c\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3064\u3044\u304f\u3064\u304b\u306e\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p><h3 class=\"wp-block-heading\"> 1. \u65e2\u5b58\u306e\u756a\u53f7\u306b\u756a\u53f7\u3092\u8ffd\u52a0\u3057\u307e\u3059<\/h3><p>\u305f\u3068\u3048\u3070\u3001\u30bb\u30eb A1 \u306b\u3042\u308b\u6570\u5024\u306b 1 \u3092\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\").Value = Range(\"A1\").Value + 1<\/code><\/pre><p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30bb\u30eb A1 \u81ea\u4f53\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001\u305d\u308c\u306b 1 \u3092\u52a0\u7b97\u3059\u308b\u3053\u3068\u3067\u3001\u30bb\u30eb A1 \u306b\u5024\u3092\u5272\u308a\u5f53\u3066\u307e\u3059\u3002\u305f\u3060\u3057\u3001 <a href=\"https:\/\/exceladvisor.org\/ja\/2\u306e\u5834\u5408\/\">VBA IF THEN ELSE \u3092<\/a>\u4f7f\u7528\u3057\u3066\u3001\u30bb\u30eb\u306b\u6570\u5024\u304c\u3042\u308b\u5834\u5408\u306b\u306e\u307f\u5909\u66f4\u3055\u308c\u308b\u6761\u4ef6\u3092\u8a18\u8ff0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">If IsNumeric(Range(\"A1\").Value) Then Range(\"A1\").Value = Range(\"A1\").Value + 1 End If<\/code><\/pre><h3 class=\"wp-block-heading\"> 2. \u30bb\u30eb\u304b\u3089\u6700\u521d\u306e\u6587\u5b57\u3092\u524a\u9664\u3057\u307e\u3059<\/h3><p>\u6b21\u306e\u30b3\u30fc\u30c9\u306f\u3001\u30bb\u30eb\u5024\u304b\u3089\u6700\u521d\u306e\u6587\u5b57\u3092\u524a\u9664\u3057\u3001\u6b8b\u308a\u306e\u5024\u3092\u30bb\u30eb\u306b\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<\/p><pre class=\"wp-block-code\"> <code class=\"language-visual-basic\" lang=\"visual-basic\">Range(\"A1\").Value = Right(Range(\"A1\").Value, Len(Range(\"A1\").Value) - 1)<\/code><\/pre><div class=\"gb-container gb-container-4db6181c gb-container-mt\"> <a class=\"gb-button gb-button-c5897111 gb-button-text gb-button-mt-button\" href=\"https:\/\/exceladvisor.org\/ja\/vba\/\">VBA\u3068\u306f<\/a><h2 class=\"gb-headline gb-headline-665e5f6b gb-headline-text gb-headline-mt-heading\">\u95a2\u9023\u3059\u308b\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/h2><div class=\"gb-grid-wrapper gb-grid-wrapper-a20baf7c gb-grid-wrapper-mt-grid\"><div class=\"gb-grid-column gb-grid-column-65ddf67e\"><div class=\"gb-container gb-container-65ddf67e\"><ul><li> <a href=\"https:\/\/exceladvisor.org\/ja\/\u884c\u6570\/\">Excel \u3067 VBA \u3092\u4f7f\u7528\u3057\u3066\u884c\u3092\u6570\u3048\u308b<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/ja\/\u6587\u5b57\u30d5\u30a9\u30f3\u30c8\/\">Excel VBA \u30d5\u30a9\u30f3\u30c8 (\u8272\u3001\u30b5\u30a4\u30ba\u3001\u7a2e\u985e\u3001\u592a\u5b57)<\/a><\/li><li> <a href=\"https:\/\/exceladvisor.org\/ja\/\u975e\u8868\u793a-\u5217\u884c\u3092\u8868\u793a\/\">Excel VBA \u5217\u307e\u305f\u306f\u884c\u306e\u8868\u793a\u3068\u975e\u8868\u793a\u3092\u5207\u308a\u66ff\u3048\u308b<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/ja\/\u7bc4\u56f21\/\">Excel VBA \u7bc4\u56f2 \u2013 \u7bc4\u56f2\u3068\u30bb\u30eb\u306e\u64cd\u4f5c<\/a><\/li><li>Excel \u3067 VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u67a0\u7dda\u3092\u9069\u7528\u3059\u308b<\/li><\/ul><\/div><\/div><div class=\"gb-grid-column gb-grid-column-50067b57\"><div class=\"gb-container gb-container-50067b57\"><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"ub_ctt_via":"","footnotes":""},"class_list":["post-3683","page","type-page","status-publish","hentry"],"featured_image_src":null,"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exceladvisor.org\/ja\/\u30bb\u30eb\u5024\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/ja\/\u30bb\u30eb\u5024\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-07T05:06:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/\",\"url\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/\",\"name\":\"\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png\",\"datePublished\":\"2023-09-01T08:07:06+00:00\",\"dateModified\":\"2023-12-07T05:06:10+00:00\",\"description\":\"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage\",\"url\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/exceladvisor.org\/ja\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vba\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/#website\",\"url\":\"https:\/\/exceladvisor.org\/ja\/\",\"name\":\"Excel Advisor\",\"description\":\"\u30c7\u30fc\u30bf\u3092\u652f\u914d\u3059\u308b\u305f\u3081\u306e\u7a76\u6975\u306e\u30ac\u30a4\u30c9!\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/ja\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/ja\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/exceladvisor.org\/ja\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/ja\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/ja\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/ja\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exceladvisor.org\/ja\/\u30bb\u30eb\u5024\/","og_locale":"ja_JP","og_type":"article","og_title":"\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?","og_description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001","og_url":"https:\/\/exceladvisor.org\/ja\/\u30bb\u30eb\u5024\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-07T05:06:10+00:00","og_image":[{"url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"1\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/","url":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/","name":"\u25b7 VBA \u7d4c\u7531\u3067\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?","isPartOf":{"@id":"https:\/\/exceladvisor.org\/ja\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage"},"thumbnailUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png","datePublished":"2023-09-01T08:07:06+00:00","dateModified":"2023-12-07T05:06:10+00:00","description":"\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001VBA \u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u8a2d\u5b9a (\u5165\u529b) \u3057\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u3001","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#primaryimage","url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png","contentUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-valeur-de-cellule-definie.png"},{"@type":"BreadcrumbList","@id":"https:\/\/exceladvisor.org\/ja\/%e3%82%bb%e3%83%ab%e5%80%a4\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/exceladvisor.org\/ja\/"},{"@type":"ListItem","position":2,"name":"Vba\u3092\u4f7f\u7528\u3057\u3066\u30bb\u30eb\u306b\u5024\u3092\u5165\u529b\u3059\u308b\u306b\u306f\u3069\u3046\u3059\u308c\u3070\u3088\u3044\u3067\u3059\u304b?"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/ja\/#website","url":"https:\/\/exceladvisor.org\/ja\/","name":"Excel Advisor","description":"\u30c7\u30fc\u30bf\u3092\u652f\u914d\u3059\u308b\u305f\u3081\u306e\u7a76\u6975\u306e\u30ac\u30a4\u30c9!","publisher":{"@id":"https:\/\/exceladvisor.org\/ja\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/ja\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/ja\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/ja\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/exceladvisor.org\/ja\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/ja\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/ja\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/ja\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/pages\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/comments?post=3683"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/pages\/3683\/revisions"}],"predecessor-version":[{"id":4296,"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/pages\/3683\/revisions\/4296"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/ja\/wp-json\/wp\/v2\/media?parent=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}