{"id":12117,"date":"2012-01-14T18:14:51","date_gmt":"2012-01-14T18:14:51","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=1203"},"modified":"2017-08-21T20:56:30","modified_gmt":"2017-08-21T20:56:30","slug":"while-loop-in-excel-vba","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/","title":{"rendered":"Step by Step tutorial for While Loop Excel VBA"},"content":{"rendered":"

In previous Article, we had seen about For Next Loop<\/a><\/strong>. In this article we are going to learn about While <\/strong><\/strong>and Do While<\/em><\/strong> Loop.<\/strong> While loop is also quite useful in Excel VBA programming. Here in this article, I will explain each and every aspect related to While loop with an Example.<\/p>\n

Now you must be wondering, why is this another loop? What is difference between this While Loop and For Loop.<\/p>\n

Major difference between For and While Loop?<\/h1>\n

Answer is very simple: When you already know the number of iteration before you run the loop, then you can simply use For Loop<\/strong>. In case you do not know – How many times your loop is going to run, then you should use While loop ro Do.. while loop<\/strong>. Do not worry about these two similar names While and Do while loop, I keep mentioning. You will learn about them here.<\/p>\n

1. While … Wend Loop in Excel VBA<\/h1>\n

Syntax:<\/h2>\n

[one_full spacing=”yes” last=”yes” center_content=”no” hide_on_mobile=”no” background_color=”#FFFFE0″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1px” border_color=”#FFCC66″ border_style=”solid” padding=”10″ margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]While<\/strong> [condition]
\n[statements]
\n…………
\n[statements]
\nWend<\/strong>
\n[\/one_full] <\/p>\n

Example:<\/h2>\n

Let’s take the same example what we discussed in previous Article with For..Next Loop.<\/a>. Calculate the Sum of all Numbers from 1 to 10 Natural Numbers.
\n[one_full spacing=”yes” last=”yes” center_content=”no” hide_on_mobile=”no” background_color=”#FFFFE0″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1px” border_color=”#FFCC66″ border_style=”solid” padding=”2″ margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]<\/p>\n

\r\niCount=1\r\nsum = 0\r\nWhile iCount <= 10\r\nsum = sum + i\r\niCount = iCount + 1\r\nWend\r\n<\/code><\/pre>\n

[\/one_full]<\/p>\n

You can see that in While Loop<\/strong>, unlike For loop,<\/strong> we need to increment the Counter variable<\/strong> value by your own. In for loop, you can see, that we need not to mention iCount= iCount + 1<\/strong> to increment the value of i by 1 in every iterations.
\n
<\/a><\/p>\n

\n

<\/i> Did you know?<\/strong><\/p>\n

<\/i> Unlike FOR Loop, you do not need to know the exact number of iteration while writing the While Loop code. All you need to know the criteria when your loop should end.
\n<\/i> Unlike FOR Loop, in while loop, you need to increase the iteration value by writing an explicit statement. For loop increases the value automatically by 1, each time it completes the iteration.<\/p>\n<\/div>\n

DO … While Loop in Excel VBA:<\/h1>\n

There are two ways of using DO…While Loop<\/strong>.
\n1. You can put the Condition before getting in to the Loop. Note:<\/strong> This is same as using normal while loop as explained above.
\n2. You can check the condition at the end of the loop. It means, in this case Loop will be executed AT LEAST once even if the Condition is failing at the first time itself.<\/p>\n

Let’s have a look on the Syntaxes of above two ways of using Do..While loop.<\/p>\n

Syntax: Type 1 – Where condition is checked at the beginning<\/h2>\n

[one_full spacing=”yes” last=”yes” center_content=”no” hide_on_mobile=”no” background_color=”#FFFFE0″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1px” border_color=”#FFCC66″ border_style=”solid” padding=”10″ margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]
\nDo While [condition]
\n[statements]
\n[Exit Do]
\n[statements]
\nLoop
\n[\/one_full]<\/p>\n

Syntax: Type 2: Where condition is checked at the End<\/h2>\n

[one_full spacing=”yes” last=”yes” center_content=”no” hide_on_mobile=”no” background_color=”#FFFFE0″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1px” border_color=”#FFCC66″ border_style=”solid” padding=”10″ margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]
\nDo<\/strong>
\n[statements]
\n…………
\n[statements]
\nLoop While [condition]
\n[\/one_full]<\/p>\n

Example:<\/h2>\n

Let’s take the same example what we discussed above. Calculate the Sum of all Numbers from 1 to 10 Natural Numbers. <\/p>\n

Example 1: Condition in the starting of the loop<\/h2>\n
\r\nSub Example1()\r\n    iCount = 1\r\n    Sum = 0\r\n    Do While iCount <= 10\r\n        Sum = Sum + iCount\r\n        iCount = iCount + 1\r\n    Loop\r\n    MsgBox Sum\r\nEnd Sub\r\n<\/code><\/pre>\n

[highlight] Result := Sum = 55[\/highlight]<\/p>\n

Example 2: Condition at the end of the loop<\/h2>\n
\r\nSub Example2()\r\n    iCount = 1\r\n    Sum = 0\r\n    Do\r\n        Sum = Sum + iCount\r\n        iCount = iCount + 1\r\n        Loop While iCount <= 10\r\n    MsgBox Sum\r\nEnd Sub\r\n<\/code><\/pre>\n

[highlight] Result := Sum = 55[\/highlight]
\n <\/p>\n

<\/i> Both the examples are giving the same result : 55
\nThat means, there is no difference in putting the condition at the beginning or at the end of the Do While loop, when condition is true at least ONE time<\/strong><\/em><\/p>\n

Difference between both way of defining do while loop<\/h1>\n

Let’s take an example where condition is not true even for the first iteration. Let’s see the difference in both way of using Loops – 1.<\/strong> Condition put in the beginning of the Loop and 2.<\/strong> Condition put at the end of the loop.<\/p>\n

\r\nSub ConditionFalseForTheFirstTimeItself_1()\r\n    Dim i As Integer, j As Integer\r\n    i = 2: j = 2\r\n    Do\r\n        MsgBox "This is the 1st iteration"\r\n    Loop While i < j   \r\nEnd Sub\r\n<\/code><\/pre>\n

[highlight] Result := Nothing…No result[\/highlight]<\/p>\n

\r\nSub ConditionFalseForTheFirstTimeItself_2()\r\n    Dim i As Integer, j As Integer\r\n    i = 2: j = 2\r\n    Do While i < j\r\n        MsgBox "This is the 1st iteration"\r\n    Loop\r\nEnd Sub\r\n<\/code><\/pre>\n

[highlight] Result := MessageBox : This is the 1st iteration[\/highlight]<\/p>\n

 
\n<\/i> With the above two examples you can clearly see the difference. 2nd function is displaying the message box with message while 1st one is not displaying anything.<\/p>\n

What is Until keyword in While Loop? <\/h1>\n

In Do While loop, Until <\/strong><\/em>keyword is also used like While <\/em><\/strong>keyword. But the question is – Are they both same?<\/em> Answer is NO<\/strong>.<\/p>\n

In simple words:<\/strong> <\/i> While<\/strong> runs till the condition becomes “False”<\/em><\/strong> whereas Until is completely opposite – It runs till the condition is True<\/em><\/strong>.
\nWhile keyword terminates the loop as soon as the condition is False
\nUntil keyword terminates the loop as soon as the condition is True<\/em><\/p>\n

So let’s see how to use Until keyword in Do while loop. Usage of Until is exactly same as while. All you need to do is replace the keyword While with Until. That is it. And ofcourse while setting the condition, you have got to be careful – which keyword are you using.<\/p>\n

Refer the below Example:<\/strong><\/p>\n

\r\nSub Example()\r\n    iCount = 1\r\n    Sum = 0\r\n    Do\r\n        Sum = Sum + iCount\r\n        iCount = iCount + 1\r\n        Loop Until iCount > 10\r\n    MsgBox Sum\r\nEnd Sub\r\n<\/code><\/pre>\n

But you can see that when you are using the keyword Until<\/strong> then you need to change the Condition. For both While or until you can not use the same condition. Because “Until”<\/em><\/strong> is like reverse of “While”<\/em><\/strong>.<\/p>\n

\n

<\/i> Important to know…<\/strong><\/p>\n

One important point to note that, Until keyword can be used only in Do … While loop. In regular while …wend loop, you can not replace While keyword with Until.<\/p>\n<\/div>\n

[one_full spacing=”yes” last=”yes” center_content=”no” hide_on_mobile=”no” background_color=”#FFFFE0″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1px” border_color=”#FFCC66″ border_style=”solid” padding=”10″ margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]
\nTo Check out more Excel Macro Tutorials, visit Excel Macro Tutorial<\/a><\/strong>
\n[\/one_full]<\/p>\n<\/span>","protected":false},"excerpt":{"rendered":"

In previous Article, we had seen about For Next Loop. In this article we are going to learn about While and Do While Loop. While loop is also quite useful in Excel VBA programming. Here in this article, I will explain each and every aspect related to While loop with an Example. Now you must […]<\/p>\n","protected":false},"author":45,"featured_media":14057,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1675],"tags":[],"class_list":["post-12117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-macro-for-beginners"],"yoast_head":"\nAll about While loop in Excel VBA - Excel VBA Programming Tutorial<\/title>\n<meta name=\"description\" content=\"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Step by Step tutorial for While Loop Excel VBA\" \/>\n<meta property=\"og:description\" content=\"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\" \/>\n<meta property=\"og:site_name\" content=\"Let's excel in Excel\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:published_time\" content=\"2012-01-14T18:14:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-08-21T20:56:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"538\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vishwamitra Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/learnexcelmacro\" \/>\n<meta name=\"twitter:site\" content=\"@learnexcelmacro\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishwamitra Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\"},\"author\":{\"name\":\"Vishwamitra Mishra\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"headline\":\"Step by Step tutorial for While Loop Excel VBA\",\"datePublished\":\"2012-01-14T18:14:51+00:00\",\"dateModified\":\"2017-08-21T20:56:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\"},\"wordCount\":1124,\"commentCount\":9,\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg\",\"articleSection\":[\"Excel Macro Tutorial\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\",\"name\":\"All about While loop in Excel VBA - Excel VBA Programming Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg\",\"datePublished\":\"2012-01-14T18:14:51+00:00\",\"dateModified\":\"2017-08-21T20:56:30+00:00\",\"description\":\"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples\",\"breadcrumb\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage\",\"url\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg\",\"contentUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg\",\"width\":800,\"height\":538},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vmlogger.com\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel Macro Tutorial\",\"item\":\"https:\/\/vmlogger.com\/excel\/excel-macro-for-beginners\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Step by Step tutorial for While Loop Excel VBA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\",\"url\":\"https:\/\/vmlogger.com\/excel\/\",\"name\":\"Let's excel in Excel\",\"description\":\"Let's share knowledge\",\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vmlogger.com\/excel\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\",\"name\":\"Vishwamitra Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"width\":528,\"height\":560,\"caption\":\"Vishwamitra Mishra\"},\"logo\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\"},\"description\":\"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.\",\"sameAs\":[\"http:\/\/www.learnexcelmacro.com\",\"http:\/\/www.facebook.com\/vmlogger\",\"https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro\",\"https:\/\/www.youtube.com\/c\/VMLogger\"],\"url\":\"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"All about While loop in Excel VBA - Excel VBA Programming Tutorial","description":"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples","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:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/","og_locale":"en_US","og_type":"article","og_title":"Step by Step tutorial for While Loop Excel VBA","og_description":"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples","og_url":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/","og_site_name":"Let's excel in Excel","article_publisher":"http:\/\/www.facebook.com\/vmlogger","article_author":"http:\/\/www.facebook.com\/vmlogger","article_published_time":"2012-01-14T18:14:51+00:00","article_modified_time":"2017-08-21T20:56:30+00:00","og_image":[{"width":800,"height":538,"url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg","type":"image\/jpeg"}],"author":"Vishwamitra Mishra","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/learnexcelmacro","twitter_site":"@learnexcelmacro","twitter_misc":{"Written by":"Vishwamitra Mishra","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#article","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/"},"author":{"name":"Vishwamitra Mishra","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"headline":"Step by Step tutorial for While Loop Excel VBA","datePublished":"2012-01-14T18:14:51+00:00","dateModified":"2017-08-21T20:56:30+00:00","mainEntityOfPage":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/"},"wordCount":1124,"commentCount":9,"publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"image":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg","articleSection":["Excel Macro Tutorial"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/","url":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/","name":"All about While loop in Excel VBA - Excel VBA Programming Tutorial","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage"},"image":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg","datePublished":"2012-01-14T18:14:51+00:00","dateModified":"2017-08-21T20:56:30+00:00","description":"Detailed article about While loop in Excel VBA. Do while Loop in Excel VBA. While Wend loop in Excel VBA with Examples. Do Loop Until loop in Excel VBA with Examples","breadcrumb":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#primaryimage","url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg","contentUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/01\/while-loop-tutorial-3.jpg","width":800,"height":538},{"@type":"BreadcrumbList","@id":"https:\/\/vmlogger.com\/excel\/2012\/01\/while-loop-in-excel-vba\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vmlogger.com\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel Macro Tutorial","item":"https:\/\/vmlogger.com\/excel\/excel-macro-for-beginners\/"},{"@type":"ListItem","position":3,"name":"Step by Step tutorial for While Loop Excel VBA"}]},{"@type":"WebSite","@id":"https:\/\/vmlogger.com\/excel\/#website","url":"https:\/\/vmlogger.com\/excel\/","name":"Let's excel in Excel","description":"Let's share knowledge","publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vmlogger.com\/excel\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5","name":"Vishwamitra Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/","url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","contentUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","width":528,"height":560,"caption":"Vishwamitra Mishra"},"logo":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/"},"description":"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.","sameAs":["http:\/\/www.learnexcelmacro.com","http:\/\/www.facebook.com\/vmlogger","https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro","https:\/\/www.youtube.com\/c\/VMLogger"],"url":"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/"}]}},"_links":{"self":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/12117"}],"collection":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/comments?post=12117"}],"version-history":[{"count":0,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/12117\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/media\/14057"}],"wp:attachment":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/media?parent=12117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/categories?post=12117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/tags?post=12117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}