How to Use Do While Loop in Excel VBA

Size: px
Start display at page:

Download "How to Use Do While Loop in Excel VBA"

Transcription

1 We have already covered an introduction to looping and the simplest type of loops, namely the For Next Loop and the For Each Next Loop, in previous tutorials. We discovered that the For Next Loop and the For Each Next Loop are utilized when the statements in the code, need to be repeated for a finite number of times. We are now going to look at how to use the Do While Loop Structure. The Do While Loop Structure is utilized when the loop needs to be repeated for an indefinite number of times, it is not fixed by a counter variable like the For Next Loop is, nor is it determined by the number of objects in a collection like the For Each Next Loop is. The Do While Loop very simply repeats a statement or action, while a certain condition specified is true, so an element of conditional logic comes into play here. It repeats the statement or action, while the specified condition is true and until the condition evaluates to false. Let s look at a simple example illustrating how to use the Do While Loop In VBA. Table of Contents 1 Using the Do While Loop in Excel VBA 2 Download Working File 3 Conclusion 4 Review Section: Test your Understanding 5 Useful Links Using the Do While Loop in Excel VBA We have a worksheet with a list of items sold in one column. We would like to use a Do While Loop in order to evaluate the list. If the item sold was Apples in the Items Sold column, then we would like the actual cell containing the text Apples to receive a blue italicised font, with a double underline and the cell next to it, in the category column, to get a value of fruit. If the item sold was Cherries in the Items Sold column, then we would like the actual cell to receive a dark pink italicised font, with a double underline and the cell next to it in the category column to get a value of fruit. If the item sold was Oranges in the Items Sold column, then we would like the actual cell to receive an orange italicised font, with a double underline and the cell next to it in the category column to get a value of fruit. Otherwise, if the cell at hand in the Items Sold column, has a vegetable listed, then we would like no formatting to be applied, and the cell next to it in the category column to receive a value of vegetables. We can thus use a Do While Loop, to help us apply the specified formatting in the Items Sold Column and to populate the Category column with the needed values. The source data is shown below. All rights reserved to ExcelDemy.com. 1

2 1) So, first things first go to Developer>Controls>Insert and under the ActiveX Controls section, choose Text Box as shown below. All rights reserved to ExcelDemy.com. 2

3 2) Draw a Text Box on the worksheet. All rights reserved to ExcelDemy.com. 3

4 3) Using the Properties Window, name the Text Box, txtresultdowhileloop. All rights reserved to ExcelDemy.com. 4

5 4) Now, go to Developer>Controls>Insert and under the ActiveX Controls section, choose Command Button and draw a button on the worksheet. All rights reserved to ExcelDemy.com. 5

6 5) Using the Properties Window, name the Command Button, cmdsubmitresult and change the caption to Submit. All rights reserved to ExcelDemy.com. 6

7 6) Right-click the button, you just created and select View Code. All rights reserved to ExcelDemy.com. 7

8 7) Enter the following code for the button click event. Private Sub cmdsubmitresult_click() Application.ScreenUpdating = False Dim valueintext As String All rights reserved to ExcelDemy.com. 8

9 Dim itemsold As String valueintext = txtresultdowhileloop.text If valueintext = Populate Then Range( A5 ).Select Do While ActiveCell.Value <> itemsold = ActiveCell.Value If itemsold = Apples Then ActiveCell.Font.Color = RGB(0, 114, 230) ActiveCell.Font.Italic = True ActiveCell.Font.Underline = xlunderlinestyledouble ActiveCell.Offset(0, 1).Value = Fruit ElseIf itemsold = Cherries Then ActiveCell.Font.Color = RGB(237, 55, 124) ActiveCell.Font.Italic = True ActiveCell.Font.Underline = xlunderlinestyledouble ActiveCell.Offset(0, 1).Value = Fruit ElseIf itemsold = Oranges Then ActiveCell.Font.Color = RGB(222, 148, 16) ActiveCell.Font.Italic = True ActiveCell.Font.Underline = xlunderlinestyledouble ActiveCell.Offset(0, 1).Value = Fruit Else ActiveCell.Offset(0, 1).Value = Vegetables End If ActiveCell.Offset(1, 0).Select Loop ElseIf valueintext = Clear Then All rights reserved to ExcelDemy.com. 9

10 Range( B5:B550 ).ClearContents Range( A5:A550 ).ClearFormats End If End Sub The first thing we are doing in the code is turning off Screen Updating, this ensures that the screen does not flicker while the code is running. This is especially useful for loops where repetitive actions are being looped through and thus if screen updating is not turned off the screen would flicker consistently as the loop is evaluated. We then declared two variables of the string data type. The first variable is called valueintext and the second variable is called itemsold. valueintext gets its value from the text input in the Text Box we created on the worksheet. We then enter into a conditional logic bloc with the If statement. Using the If statement we check if the valueintext value is Populate, in other words, has the user entered the word Populate in the Text Box on the worksheet. If the user has entered the word Populate in the text box, then the first thing that needs to be done is that the cell A5 in the worksheet needs to be selected. This is the first cell containing data under the column heading Items Sold. We then open the Loop Structure with the Do While ActiveCell.Value<>. This is a very important line since if it is omitted, we would basically be creating what is known as an infinite loop. This line says that looping should occur (i.e the statements within the Do While Loop should be repeated) as long as the active cell is not blank. This is part of what is required for a Do While Loop as well, since when we use a Do While Loop, we are saying an action or set of statements should be repeated as long as the condition (which in this case is that the active cell is not blank) is true, once the condition is false the repetition stops. All rights reserved to ExcelDemy.com. 10

11 Click on the image to see a larger version An infinite loop is a loop that just goes on executing the repetitive statements without stopping. If for some reason, one has accidentally constructed an infinite loop, one can press Ctrl-Alt-Break on the keyboard, in order to stop the program from executing. We then state that the second variable we declared itemsold will take on the value of whatever the active cell value is. We then open an If conditional logic statement within the actual loop, that will have to be evaluated as part of the loop. If itemsold or the active cell, in other words, is Apples then a dark blue font color will be set, the font will be italicised and the text will be double underlined. In addition, the cell in the column next to the Apples text will receive a value of Fruit, which ActiveCell.Offset(0, 1).Value = Fruit specifies. So in this way we are formatting the values in the Items Sold column and also populating the Category column on the worksheet. If the active cell value is Cherries, then a dark pink font color will be set, the font will be italicised and the text will be double underlined. In this case, as well the cell, in the column next to the Cherries text will receive a value of Fruit. If the active cell value is Oranges, then an orange font color will be set, the font will be italicised and the text will be double underlined. In addition, the cell in the column next to the Oranges text will receive a value of Fruit. In all other cases, no formatting will be All rights reserved to ExcelDemy.com. 11

12 applied to the actual cell, the only thing that will happen is that the cell next to the active cell will receive a value of vegetables. We end the If statement within the actual loop with an End if. We then specify that we need to move on to the cell immediately below the former active cell once the statements have been evaluated and executed, using this line of code: ActiveCell.Offset(1, 0).Select. So, in other words, the new active cell, is the cell in the row immediately below the former active cell. Then the loop executes the statements using the new active cell. We end the loop, and then we go back to the initial If statement and declare that if the value in the Text Box on the worksheet is Clear, then clear the contents in the category column and clear all the formatting in the Items sold column. We then end the overall conditional logic block with an end if statement.8) Return to the worksheet and 8) Return to the worksheet and making sure Design Mode is not activated, enter the text Populate in the Text Box, on the worksheet as shown below. All rights reserved to ExcelDemy.com. 12

13 9) Click on the Submit button in order to format the text in the Items Sold column and populate the Category column, simultaneously with the categories specified, in the code as shown below. 10) Then type Clear in the text box on the worksheet and click on the Submit button. All rights reserved to ExcelDemy.com. 13

14 All rights reserved to ExcelDemy.com. 14

15 The Category column is now cleared of all the values, and the Items Sold column is cleared of all the specific formatting. And there you have it. Download Working File DoWhileLoopExcelVBA Conclusion The Do While Loop Structure is utilized when one wants to repeat statements or actions, as long as a certain specified condition evaluates to true. It is slightly more complex than the For Next Loop Structure and the For Each Next Loop Structure, however, it is more versatile and can be used when one is not sure of a number of times exactly that the statements in the loop have to be repeated. All rights reserved to ExcelDemy.com. 15

16 Please feel free to tell us if you use the Do While Loop structure in your VBA code. Review Section: Test your Understanding 1) When does one use a Do While Loop? 2) What is an infinite loop? 3) How does one exit an infinite loop? 4) Using a Do While Loop, fill each cell in a range containing data, with a blue fill, up until one reaches a blank cell. Useful Links Do While Loop VBA Loops 6 SHARES FacebookTwitter Taryn N Taryn is a Microsoft Certified Professional, who has used Office Applications such as Excel and Access extensively, in her interdisciplinary academic career and work experience. She has a background in biochemistry, Geographical Information Systems (GIS) and biofuels. She enjoys showcasing the functionality of Excel in various disciplines. In her spare time when she s not exploring Excel or Access, she is into graphic design, amateur photography and caring for her two pets, Pretzel and Snoopy. All rights reserved to ExcelDemy.com. 16

How to Create a For Next Loop in Excel VBA!

How to Create a For Next Loop in Excel VBA! Often when writing VBA code, one may need to repeat the same action or series of actions more than a couple of times. One could, in this case, write each action over and over in one s code or alternatively

More information

Read More: Index Function Excel [Examples, Make Dynamic Range, INDEX MATCH]

Read More: Index Function Excel [Examples, Make Dynamic Range, INDEX MATCH] You can utilize the built-in Excel Worksheet functions such as the VLOOKUP Function, the CHOOSE Function and the PMT Function in your VBA code and applications as well. In fact, most of the Excel worksheet

More information

Do Until Loop in Excel VBA with Examples

Do Until Loop in Excel VBA with Examples The Do Until Loop Structure is utilized, when one has a set of statements or actions to be repeated and repetition occurs until the condition evaluates to true, in other words, while the condition is false

More information

How to Use the Select Case Structure in Excel VBA

How to Use the Select Case Structure in Excel VBA One can implement conditional logic in VBA using an IF statement, multiple IF-Elseif statements or one can use the Select Case statement in order to implement conditional logic. In the case where one has

More information

Changing Case using Worksheet Functions and Excel VBA

Changing Case using Worksheet Functions and Excel VBA Excel provides the text worksheet functions, namely the Upper Function, the Lower Function and the Proper Function, which can change the case of a specified input text string. This text string could be

More information

MAX vs MAXA vs LARGE and MIN vs MINA vs SMALL Functions in Excel

MAX vs MAXA vs LARGE and MIN vs MINA vs SMALL Functions in Excel provides functions to calculate the largest or maximum value in a range and also functions to calculate the smallest or minimum value in a range. The first function we are going to look at is the MAX Function.

More information

Read More: How to Make Excel Graphs Look Professional & Cool [10 Awesome Tips]!

Read More: How to Make Excel Graphs Look Professional & Cool [10 Awesome Tips]! How to Modify Color, Font, & Effects & Create Custom Excel Excel has themes, which have different default colors, auto shape effects, SmartArt effects, and fonts. When utilizing themes one can quickly

More information

So let s get started with a simple example to illustrate the difference between the worksheet level protection and workbook level protection.

So let s get started with a simple example to illustrate the difference between the worksheet level protection and workbook level protection. It is often necessary to protect either the sensitive information in one s actual worksheet or the workbook structure, from being edited. Excel provides different options for protecting and securing one

More information

Exchange (Copy, Import, Export) Data Between Excel and Access

Exchange (Copy, Import, Export) Data Between Excel and Access Excel usage is widespread and Excel is often the go-to Office application for data entry, analysis, and manipulation. Microsoft Access provides relational database capability in a compact desktop environment.

More information

Read More: How to Make a Pie Chart in Excel [Video Tutorial]

Read More: How to Make a Pie Chart in Excel [Video Tutorial] Most of us are familiar with standard Excel chart types such as a pie chart, a column chart, and a line chart, as well as the types of data they are used to showcase visually. Excel, however, offers a

More information

Read More: How to Create Combination Charts with a Secondary Axis in Excel

Read More: How to Create Combination Charts with a Secondary Axis in Excel A pie chart is used to showcase parts of a whole or proportions of a whole. Charts are visual representations of data that can summarize large data sets and are useful for engaging one s audience. As always,

More information

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide VBA Visual Basic for Applications Learner Guide 1 Table of Contents SECTION 1 WORKING WITH MACROS...5 WORKING WITH MACROS...6 About Excel macros...6 Opening Excel (using Windows 7 or 10)...6 Recognizing

More information

Sébastien Mathier www.excel-pratique.com/en Selections : We'll begin by creating a macro that selects the cell that we specifiy. First open the editor and add a module : In the module, type "sub selection"

More information

Corporate Information & Computing Services. Customising Facility CMIS Cell Styles and Timetable Views Training Course

Corporate Information & Computing Services. Customising Facility CMIS Cell Styles and Timetable Views Training Course Corporate Information & Computing Services. 285-9 Glossop Rd Sheffield S10 2HB Cliff Alcock Email: c.alcock@sheffield.ac.uk Tel: (0114) 2221171 Fax: (0114) 2221188 Customising Facility CMIS Cell Styles

More information

Read More: Keyboard Shortcuts for Moving around Excel Spreadsheets

Read More: Keyboard Shortcuts for Moving around Excel Spreadsheets You will do all your works in a workbook file. You can add as many worksheets as you need in a workbook file. Each worksheet appears in its own window. By default, Excel workbooks use a.xlsx file extension.

More information

Watch the video below to learn more about formatting cells in Excel. *Video removed from printing pages. To change the font size:

Watch the video below to learn more about formatting cells in Excel. *Video removed from printing pages. To change the font size: Excel 06 Formatting Cells Introduction All cell content uses the same formatting by default, which can make it di icult to read a workbook with a lot of information. Basic formatting can customize the

More information

Advanced Excel Macros : Data Validation/Analysis : OneDrive

Advanced Excel Macros : Data Validation/Analysis : OneDrive Advanced Excel Macros : Data Validation/Analysis : OneDrive Macros Macros in Excel are in short, a recording of keystrokes. Beyond simple recording, you can use macros to automate tasks that you will use

More information

Introduction to VBA for Excel-Tutorial 7. The syntax to declare an array starts by using the Dim statement, such that:

Introduction to VBA for Excel-Tutorial 7. The syntax to declare an array starts by using the Dim statement, such that: Introduction to VBA for Excel-Tutorial 7 In this tutorial, you will learn deal with arrays. We will first review how to declare the arrays, then how to pass data in and how to output arrays to Excel environment.

More information

Candy is Dandy Project (Project #12)

Candy is Dandy Project (Project #12) Candy is Dandy Project (Project #12) You have been hired to conduct some market research about M&M's. First, you had your team purchase 4 large bags and the results are given for the contents of those

More information

3. (1.0 point) To quickly switch to the Visual Basic Editor, press on your keyboard. a. Esc + F1 b. Ctrl + F7 c. Alt + F11 d.

3. (1.0 point) To quickly switch to the Visual Basic Editor, press on your keyboard. a. Esc + F1 b. Ctrl + F7 c. Alt + F11 d. Excel Tutorial 12 1. (1.0 point) Excel macros are written in the programming language. a. Perl b. JavaScript c. HTML d. VBA 2. (1.0 point) To edit a VBA macro, you need to use the Visual Basic. a. Manager

More information

EXCEL BASICS: MICROSOFT OFFICE 2010

EXCEL BASICS: MICROSOFT OFFICE 2010 EXCEL BASICS: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION Lesson 1 - Recording Macros Excel 2000: Level 5 (VBA Programming) Student Edition LESSON 1 - RECORDING MACROS... 4 Working with Visual Basic Applications...

More information

C++ Programming: From Problem Analysis to Program Design, Third Edition

C++ Programming: From Problem Analysis to Program Design, Third Edition C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 5: Control Structures II (Repetition) Why Is Repetition Needed? Repetition allows you to efficiently use variables Can input,

More information

Excel Project 1 Creating a Worksheet and an Embedded Chart

Excel Project 1 Creating a Worksheet and an Embedded Chart 7 th grade Business & Computer Science 1 Excel Project 1 Creating a Worksheet and an Embedded Chart What is MS Excel? MS Excel is a powerful spreadsheet program that allows users to organize data, complete

More information

Advanced Financial Modeling Macros. EduPristine

Advanced Financial Modeling Macros. EduPristine Advanced Financial Modeling Macros EduPristine www.edupristine.com/ca Agenda Introduction to Macros & Advanced Application Building in Excel Introduction and context Key Concepts in Macros Macros as recorded

More information

A PRACTICAL TUTORIAL TO EXCEL

A PRACTICAL TUTORIAL TO EXCEL 2010 BEGINNERS A PRACTICAL TUTORIAL TO EXCEL by: Julio C. Fajardo A Practical Tutorial to Excel About: Excel is one of the early software tools developed by Microsoft. The program has been widely adopted

More information

Application of Skills: Microsoft Excel 2013 Tutorial

Application of Skills: Microsoft Excel 2013 Tutorial Application of Skills: Microsoft Excel 2013 Tutorial Throughout this module, you will progress through a series of steps to create a spreadsheet for sales of a club or organization. You will continue to

More information

Download the files from you will use these files to finish the following exercises.

Download the files from  you will use these files to finish the following exercises. Exercise 6 Download the files from http://www.peter-lo.com/teaching/x4-xt-cdp-0071-a/source6.zip, you will use these files to finish the following exercises. 1. This exercise will guide you how to create

More information

most of that the data into change the paste Rename the sheet this:

most of that the data into change the paste Rename the sheet this: Tutorial 2: A more advanced and useful macro Now that you are somewhat familiar with the programing environment of VBA, this will introduce you, quickly, to some of the more useful commands you can do

More information

Excel has a powerful automation feature that lets you automate processes that you need to do repeatedly.

Excel has a powerful automation feature that lets you automate processes that you need to do repeatedly. Professor Shoemaker There are times in Excel when you have a process that requires several or many steps and that you need to do repeatedly. Excel has a powerful automation feature that lets you automate

More information

Visual basic tutorial problems, developed by Dr. Clement,

Visual basic tutorial problems, developed by Dr. Clement, EXCEL Visual Basic Tutorial Problems (Version January 20, 2009) Dr. Prabhakar Clement Arthur H. Feagin Distinguished Chair Professor Department of Civil Engineering, Auburn University Home page: http://www.eng.auburn.edu/users/clemept/

More information

AC : SPREADSHEET TECHNIQUES FOR ENGINEERING PROFESSORS: THE CASE OF EXCEL AND ENGINEERING ECONOMICS

AC : SPREADSHEET TECHNIQUES FOR ENGINEERING PROFESSORS: THE CASE OF EXCEL AND ENGINEERING ECONOMICS AC 2007-1453: SPREADSHEET TECHNIQUES FOR ENGINEERING PROFESSORS: THE CASE OF EXCEL AND ENGINEERING ECONOMICS John Ristroph, University of Louisiana-Lafayette JOHN H. RISTROPH is an emeritus Professor of

More information

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2007 EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

Using Excel 2011 at Kennesaw State University

Using Excel 2011 at Kennesaw State University Using Excel 2011 at Kennesaw State University Getting Started Information Technology Services Outreach and Distance Learning Technologies Copyright 2011 - Information Technology Services Kennesaw State

More information

EGR1301_Linear_Equation_Solver_ docx. 1. Select Options 2. Select Add Ins. 3. Select Solver Add in and press OK.

EGR1301_Linear_Equation_Solver_ docx. 1. Select Options 2. Select Add Ins. 3. Select Solver Add in and press OK. 1. Select Options 2. Select Add Ins 3. Select Solver Add in and press OK Page 1 of 13 4. Select Analysis ToolPak and press OK 5. Select Analysis ToolPak VBA and press OK Page 2 of 13 6. From Quick Access

More information

4) Study the section of a worksheet in the image below. What is the cell address of the cell containing the word "Qtr3"?

4) Study the section of a worksheet in the image below. What is the cell address of the cell containing the word Qtr3? Choose The Correct Answer: 1) Study the highlighted cells in the image below and identify which of the following represents the correct cell address for these cells: a) The cell reference for the selected

More information

EXCEL WORKSHOP III INTRODUCTION TO MACROS AND VBA PROGRAMMING

EXCEL WORKSHOP III INTRODUCTION TO MACROS AND VBA PROGRAMMING EXCEL WORKSHOP III INTRODUCTION TO MACROS AND VBA PROGRAMMING TABLE OF CONTENTS 1. What is VBA? 2. Safety First! 1. Disabling and Enabling Macros 3. Getting started 1. Enabling the Developer tab 4. Basic

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

Learning Excel VBA. Using Loops in Your Code. ComboProjects. Prepared By Daniel Lamarche

Learning Excel VBA. Using Loops in Your Code. ComboProjects. Prepared By Daniel Lamarche Learning Excel VBA Using s in Your Code Prepared By Daniel Lamarche ComboProjects Using s in Your Code By Daniel Lamarche (Last update June 2016). s are pretty simple in concept however many new programmers

More information

Excel. module. Lesson 1 Create a Worksheet Lesson 2 Create and Revise. Lesson 3 Edit and Format

Excel. module. Lesson 1 Create a Worksheet Lesson 2 Create and Revise. Lesson 3 Edit and Format module 2 Excel Lesson 1 Create a Worksheet Lesson 2 Create and Revise Formulas Lesson 3 Edit and Format Worksheets Lesson 4 Print Worksheets Lesson 5 Modify Workbooks Lesson 6 Create and Modify Charts

More information

From workbook ExcelPart2.xlsx, select FlashFillExample worksheet.

From workbook ExcelPart2.xlsx, select FlashFillExample worksheet. Microsoft Excel 2013: Part 2 More on Cells: Modifying Columns, Rows, & Formatting Cells Find and Replace This feature helps you save time to locate specific information when working with a lot of data

More information

Open Excel by following the directions listed below: Click on Start, select Programs, and the click on Microsoft Excel.

Open Excel by following the directions listed below: Click on Start, select Programs, and the click on Microsoft Excel. Candy is Dandy Grading Rubric You have been hired to conduct some market research about M&M's. First, you had your team purchase 4 large bags and the results are given for the contents of those bags. You

More information

IDENTIFYING UNIQUE VALUES IN AN ARRAY OR RANGE (VBA)

IDENTIFYING UNIQUE VALUES IN AN ARRAY OR RANGE (VBA) Date: 20/11/2012 Procedure: Identifying Unique Values In An Array Or Range (VBA) Source: LINK Permalink: LINK Created by: HeelpBook Staff Document Version: 1.0 IDENTIFYING UNIQUE VALUES IN AN ARRAY OR

More information

Lesson 1 Excel Tutorial Learning how to use Microsoft Excel 2010 page 1

Lesson 1 Excel Tutorial Learning how to use Microsoft Excel 2010 page 1 Lesson 1 Excel Tutorial Learning how to use Microsoft Excel 2010 page 1 Step 1: When you first open up Excel 2010, this is what you will see. This is considered an Excel worksheet. Step 2: Notice the bottom

More information

The For Next and For Each Loops Explained for VBA & Excel

The For Next and For Each Loops Explained for VBA & Excel The For Next and For Each Loops Explained for VBA & Excel excelcampus.com /vba/for-each-next-loop/ 16 Bottom line: The For Next Loops are some of the most powerful VBA macro coding techniques for automating

More information

Excel Macro Record and VBA Editor. Presented by Wayne Wilmeth

Excel Macro Record and VBA Editor. Presented by Wayne Wilmeth Excel Macro Record and VBA Editor Presented by Wayne Wilmeth 1 What Is a Macro? Automates Repetitive Tasks Written in Visual Basic for Applications (VBA) Code Macro Recorder VBA Editor (Alt + F11) 2 Executing

More information

A Product of. Structured Solutions Inc.

A Product of. Structured Solutions Inc. SSI Tools Time Scaled Values Analysis Tools Structured Solutions Inc. www.ssitools.com A Product of Structured Solutions Inc. 1 Modify The Columns in the Sheet Named Template SSI Status Workbook Template

More information

Forms. Section 3: Deleting a Category

Forms. Section 3: Deleting a Category 9. If a category was NOT previously published, Authors may modify it by following the same procedures as an Administrator or Publisher. When the category is ready for publishing an Author must Save and

More information

RCX Tutorial. Commands Sensor Watchers Stack Controllers My Commands

RCX Tutorial. Commands Sensor Watchers Stack Controllers My Commands RCX Tutorial Commands Sensor Watchers Stack Controllers My Commands The following is a list of commands available to you for programming the robot (See advanced below) On Turns motors (connected to ports

More information

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation.

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation. UNIT III PROBLEM SOLVING AND OFFICE AUTOMATION Planning the Computer Program Purpose Algorithm Flow Charts Pseudo code -Application Software Packages- Introduction to Office Packages (not detailed commands

More information

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and

VBA Collections A Group of Similar Objects that Share Common Properties, Methods and VBA AND MACROS VBA is a major division of the stand-alone Visual Basic programming language. It is integrated into Microsoft Office applications. It is the macro language of Microsoft Office Suite. Previously

More information

EXCEL BASICS. Helen Mills META Solutions

EXCEL BASICS. Helen Mills META Solutions EXCEL BASICS Helen Mills META Solutions OUTLINE Introduction- Highlight Basic Components of Microsoft Excel Entering & Formatting Data, Numbers, & Tables Calculating Totals & Summaries Using Formulas Conditional

More information

Top 15 Excel Tutorials

Top 15 Excel Tutorials Top 15 Excel Tutorials Follow us: TeachExcel.com Contents How to Input, Edit, and Manage Formulas and Functions in Excel... 2 How to Quickly Find Data Anywhere in Excel... 8 How to use the Vlookup Function

More information

Create your first workbook

Create your first workbook Create your first workbook You've been asked to enter data in Excel, but you've never worked with Excel. Where do you begin? Or perhaps you have worked in Excel a time or two, but you still wonder how

More information

How to Reduce Large Excel File Size (Ultimate Guide)

How to Reduce Large Excel File Size (Ultimate Guide) Handling a large file is important as it takes a huge amount of time to transfer. A large file takes too much time to open. Any kind of change in a large file takes a long time to update. So, reducing

More information

CSC 121 Computers and Scientific Thinking

CSC 121 Computers and Scientific Thinking CSC 121 Computers and Scientific Thinking Fall 2005 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language

More information

Boardmaker 5.0 (Macintosh) Creating a Story Response Board. Introduction. Case Study. Learning Objectives

Boardmaker 5.0 (Macintosh) Creating a Story Response Board. Introduction. Case Study. Learning Objectives Boardmaker 5.0 (Macintosh) Creating a Story Response Board Introduction Boardmaker is an excellent program to use for creating resources to support students as they develop literacy skills. Its large electronic

More information

CSE 123 Introduction to Computing

CSE 123 Introduction to Computing CSE 123 Introduction to Computing Lecture 11 Programming with Arrays SPRING 2012 Assist. Prof. A. Evren Tugtas Array Variables Review For detailed information on array variables look at the notes of Lecture

More information

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION Welcome! Thank you for choosing WWP as your learning and development provider. We hope that your programme today will be a stimulating, informative

More information

Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools

Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools Structured Solutions Inc. Tools MS Project to Excel Export/Import Tools This Macro Enabled Excel workbook contains a collection of useful tools that enables the user to Get, Post or Lookup data from MS

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Formatting a spreadsheet means changing the way it looks to make it neater and more attractive. Formatting changes can include modifying number styles, text size and colours. Many

More information

LESSON 3. In this lesson you will learn about the conditional and looping constructs that allow you to control the flow of a PHP script.

LESSON 3. In this lesson you will learn about the conditional and looping constructs that allow you to control the flow of a PHP script. LESSON 3 Flow Control In this lesson you will learn about the conditional and looping constructs that allow you to control the flow of a PHP script. In this chapter we ll look at two types of flow control:

More information

Quick Reference Guide 8 Excel 2013 for Windows Keyboard Shortcut Keys

Quick Reference Guide 8 Excel 2013 for Windows Keyboard Shortcut Keys Quick Reference Guide 8 Excel 2013 for Windows Keyboard Shortcut Keys Control Shortcut s Ctrl + PgDn Ctrl + PgUp Ctrl + Shift + & Ctrl + Shift_ Ctrl + Shift + ~ Ctrl + Shift + $ Ctrl + Shift + % Ctrl +

More information

Excel Module 7: Managing Data Using Tables

Excel Module 7: Managing Data Using Tables True / False 1. You should not have any blank columns or rows in your table. True LEARNING OBJECTIVES: ENHE.REDI.16.131 - Plan the data organization for a table 2. Field names should be similar to cell

More information

TECCS Computer Repairs & IT Services

TECCS Computer Repairs & IT Services TECCS Computer Repairs & IT Services Keyboard Keys & Keyboard Shortcuts Contents Document Information...1 Author...1 Acknowledgements...1 Publication Date...1 Category and Level...1 Getting Started...2

More information

Ms Excel Vba Continue Loop Through Columns Range

Ms Excel Vba Continue Loop Through Columns Range Ms Excel Vba Continue Loop Through Columns Range Learn how to make your VBA code dynamic by coding in a way that allows your 5 Different Ways to Find The Last Row or Last Column Using VBA In Microsoft

More information

Tutorials. Lesson 3 Work with Text

Tutorials. Lesson 3 Work with Text In this lesson you will learn how to: Add a border and shadow to the title. Add a block of freeform text. Customize freeform text. Tutorials Display dates with symbols. Annotate a symbol using symbol text.

More information

Separate, Split & Remove Substring & Number from Text with Excel Functions & VBA

Separate, Split & Remove Substring & Number from Text with Excel Functions & VBA [Editor s Note: This is a guide on how to separate, split & remove substring & numbers from text using Excel Functions and VBA. Examples of substring functions are CHAR, FIND, LEFT, LOWER, MID, PROPER,

More information

Created by Cheryl Tice. Table of Contents

Created by Cheryl Tice. Table of Contents Created by Cheryl Tice 1 Table of Contents What is Excel?.3 Excel Window..4 What is Your Mouse Telling You?...5 Common Keyboard Shortcuts...6 Moving Around a Worksheet.7 Formulas...8 Formula Tips...9 Vocabulary..10

More information

The Excel Project: Excel for Accountants, Business People... from the Beginning Duncan Williamson

The Excel Project: Excel for Accountants, Business People... from the Beginning Duncan Williamson The Excel Project: Excel for Accountants, Business People... from the Beginning Duncan Williamson Introduction In this book you will see that we use Excel 2007 as the focal point of much of the work we

More information

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Problem Solving through Programming In C Prof. Anupam Basu Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture 18 Switch Statement (Contd.) And Introduction to

More information

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type >

VBA Handout. References, tutorials, books. Code basics. Conditional statements. Dim myvar As <Type > VBA Handout References, tutorials, books Excel and VBA tutorials Excel VBA Made Easy (Book) Excel 2013 Power Programming with VBA (online library reference) VBA for Modelers (Book on Amazon) Code basics

More information

3 Excel Tips for Marketing Efficiency

3 Excel Tips for Marketing Efficiency 3 Excel Tips for Marketing Efficiency 3 Excel Database Tips for Marketing Efficiency In these challenging times, companies continue to reduce staff to save money. Those who remain must do more. How to

More information

LmÉPï C Á npï À ƵÀ ïì itech Analytic Solutions

LmÉPï C Á npï À ƵÀ ïì itech Analytic Solutions LmÉPï C Á npï À ƵÀ ïì itech Analytic Solutions No. 9, 1st Floor, 8th Main, 9th Cross, SBM Colony, Brindavan Nagar, Mathikere, Bangalore 560 054 Email: itechanalytcisolutions@gmail.com Website: www.itechanalytcisolutions.com

More information

CHAPTER 1 GETTING STARTED

CHAPTER 1 GETTING STARTED GETTING STARTED WITH EXCEL CHAPTER 1 GETTING STARTED Microsoft Excel is an all-purpose spreadsheet application with many functions. We will be using Excel 97. This guide is not a general Excel manual,

More information

Module 7 - Housing Bubble Dashboard - Part 1-1

Module 7 - Housing Bubble Dashboard - Part 1-1 Module 7 - Housing Bubble Dashboard - Part 1 TOPICS COVERED: In this module, we will learn how to creatie professional, dynamic business dashboards in Excel. 1) New York Times - Housing Bubble Infographic

More information

Microsoft Excel XP. Intermediate

Microsoft Excel XP. Intermediate Microsoft Excel XP Intermediate Jonathan Thomas March 2006 Contents Lesson 1: Headers and Footers...1 Lesson 2: Inserting, Viewing and Deleting Cell Comments...2 Options...2 Lesson 3: Printing Comments...3

More information

How to Generate Random Numbers in Excel (Ultimate Guide)

How to Generate Random Numbers in Excel (Ultimate Guide) Random numbers are those numbers which are generated by a process in which the outcome is not predictable and in a defined interval/set, the values are uniformly distributed. Random numbers are used in

More information

Status Bar: Right click on the Status Bar to add or remove features.

Status Bar: Right click on the Status Bar to add or remove features. Excel 2013 Quick Start Guide The Excel Window File Tab: Click to access actions like Print, Save As, etc. Also to set Excel options. Ribbon: Logically organizes actions onto Tabs, Groups, and Buttons to

More information

12 BASICS OF MS-EXCEL

12 BASICS OF MS-EXCEL 12 BASICS OF MS-EXCEL 12.1 INTRODUCTION MS-Excel 2000 is a Windows based application package. It is quite useful in entering, editing, analysis and storing of data. Arithmetic operations with numerical

More information

<excelunusual.com> Easy Zoom -Chart axis Scaling Using VBA - by George Lungu. <www.excelunusual.com> 1. Introduction: Chart naming: by George Lungu

<excelunusual.com> Easy Zoom -Chart axis Scaling Using VBA - by George Lungu. <www.excelunusual.com> 1. Introduction: Chart naming: by George Lungu Easy Zoom -Chart axis Scaling Using VBA - by George Lungu Introduction: - In certain models we need to be able to change the scale of the chart axes function of the result of a simulation - An Excel chart

More information

1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell?

1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell? Q75-100 1. What tool do you use to check which cells are referenced in formulas that are assigned to the active cell? A. Reference Finder B. Range Finder C. Reference Checker D. Address Finder B. Range

More information

Introduction to macros

Introduction to macros L E S S O N 7 Introduction to macros Suggested teaching time 30-40 minutes Lesson objectives To understand the basics of creating Visual Basic for Applications modules in Excel, you will: a b c Run existing

More information

Review # What technique selects data from the Internet to add to an Excel worksheet? A. Web search B. Web filter C. Internet probe D.

Review # What technique selects data from the Internet to add to an Excel worksheet? A. Web search B. Web filter C. Internet probe D. Review #8 176. What technique selects data from the Internet to add to an Excel A. Web search B. Web filter C. Internet probe D. Web query 177. What is a single character, word, or phrase in a cell on

More information

Computer Science Lab Exercise 1

Computer Science Lab Exercise 1 1 of 10 Computer Science 127 - Lab Exercise 1 Introduction to Excel User-Defined Functions (pdf) During this lab you will experiment with creating Excel user-defined functions (UDFs). Background We use

More information

Ms Excel Vba Continue Loop Through Range Of

Ms Excel Vba Continue Loop Through Range Of Ms Excel Vba Continue Loop Through Range Of Rows Learn how to make your VBA code dynamic by coding in a way that allows your 5 Different Ways to Find The Last Row or Last Column Using VBA In Microsoft

More information

Module 3 - Applied UDFs - 1

Module 3 - Applied UDFs - 1 Module 3 - Applied UDFs TOPICS COVERED: This module will continue the discussion of the UDF JOIN covered in the previous video... 1) Testing a Variant for Its Type (0:05) 2) Force the Creation of an Array

More information

Getting started 7. Writing macros 23

Getting started 7. Writing macros 23 Contents 1 2 3 Getting started 7 Introducing Excel VBA 8 Recording a macro 10 Viewing macro code 12 Testing a macro 14 Editing macro code 15 Referencing relatives 16 Saving macros 18 Trusting macros 20

More information

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6)

DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) Technology & Information Management Instructor: Michael Kremer, Ph.D. Database Program: Microsoft Access Series DATABASE AUTOMATION USING VBA (ADVANCED MICROSOFT ACCESS, X405.6) AGENDA 3. Executing VBA

More information

If you finish the work for the day go to QUIA and review any objective you feel you need help with.

If you finish the work for the day go to QUIA and review any objective you feel you need help with. 8 th Grade Computer Skills and Applications Common Assessment Review DIRECTIONS: Complete each activity listed under each heading in bold. If you are asked to define terms or answer questions do so on

More information

Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:...

Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:... Highline Excel 2016 Class 10: Data Validation Table of Contents Data Validation... 2 Data Validation Dialog Box... 3 INDIRECT function... 3 Cumulative List of Keyboards Throughout Class:... 4 Page 1 of

More information

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8

TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 TABLE OF CONTENTS PART I: BASIC MICROSOFT WORD TOOLS... 1 PAGE BREAKS... 1 SECTION BREAKS... 3 STYLES... 6 TABLE OF CONTENTS... 8 LIST OF TABLES / LIST OF FIGURES... 11 PART II: FORMATTING REQUIREMENTS:

More information

Microsoft Excel 2007

Microsoft Excel 2007 Learning computers is Show ezy Microsoft Excel 2007 301 Excel screen, toolbars, views, sheets, and uses for Excel 2005-8 Steve Slisar 2005-8 COPYRIGHT: The copyright for this publication is owned by Steve

More information

DecisionPoint For Excel

DecisionPoint For Excel DecisionPoint For Excel Getting Started Guide 2015 Antivia Group Ltd Notation used in this workbook Indicates where you need to click with your mouse Indicates a drag and drop path State >= N Indicates

More information

How to Remove Duplicate Rows in Excel

How to Remove Duplicate Rows in Excel How to Remove Duplicate Rows in Excel http://www.howtogeek.com/198052/how-to-remove-duplicate-rows-in-excel/ When you are working with spreadsheets in Microsoft Excel and accidentally copy rows, or if

More information

Tutorial Tutorial. (Click here to go to the next slide and to learn more)

Tutorial Tutorial. (Click here to go to the next slide and to learn more) Tutorial Tutorial Read all the directions before proceeding Anything that says (click to learn more) will point to a button that you can click to learn more information about that topic. In the bottom

More information

Jet Professional Basic Training Reference Guide

Jet Professional Basic Training Reference Guide Jet Professional Basic Training Reference Guide Prerequisite Knowledge The Jet Professional Basic Training webinar will take you through the basic functions and prepare you to write reports. Before beginning,

More information

Secrets Of Ms Excel Vba Macros For Beginners Save Your Time With Visual Basic Macros

Secrets Of Ms Excel Vba Macros For Beginners Save Your Time With Visual Basic Macros Secrets Of Ms Excel Vba Macros For Beginners Save Your Time With Visual Basic Macros We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our ebooks online or

More information

Control Statements. Objectives. ELEC 206 Prof. Siripong Potisuk

Control Statements. Objectives. ELEC 206 Prof. Siripong Potisuk Control Statements ELEC 206 Prof. Siripong Potisuk 1 Objectives Learn how to change the flow of execution of a MATLAB program through some kind of a decision-making process within that program The program

More information

Maximizing the Power of Excel With Macros and Modules

Maximizing the Power of Excel With Macros and Modules Maximizing the Power of Excel With Macros and Modules Produced by SkillPath Seminars The Smart Choice 6900 Squibb Road P.O. Box 2768 Mission, KS 66201-2768 1-800-873-7545 www.skillpath.com Maximizing the

More information