Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science & Engineering 2111 Data Validation and Macros 1 CSE 2111 Lecture-Data Validation and Macros.

Similar presentations


Presentation on theme: "Computer Science & Engineering 2111 Data Validation and Macros 1 CSE 2111 Lecture-Data Validation and Macros."— Presentation transcript:

1 Computer Science & Engineering 2111 Data Validation and Macros 1 CSE 2111 Lecture-Data Validation and Macros

2 Data Validation Controls the type of data or the values input in a cell Reduces input errors Multiple criterion can be applied to a cell CSE 2111 Lecture-Data Validation and Macros 2 Display a message dialog boxRestrict input to a whole number within limits Restrict input to values in a drop down listRestrict input to a decimal number within limits Restrict input to a certain time frame. (either date, time, or both) Restrict text to a specified length Calculate what is allowed based on the value in another cell Use a formula to calculate what is valid

3 Macro A series of commands and functions that are stored in a Microsoft Visual Basic module Automates your keystrokes and actions in Excel Use these when you complete the same tasks repetitively When you create a macro VBA program code is automatically generated CSE 2111 Lecture-Data Validation and Macros 3

4 Record Macro CSE 2111 Lecture-Data Validation and Macros 4 Click on Developer Click on Record Macro

5 Macro Walk Through CSE 2111 Lecture-Data Validation and Macros 5 Step 1: Delete the information in cells B1 and B2 Step 2: In Cell B1, Input the following Function =CONCATENATE(LEFT(A1,3),”-”, MID(A1,4,3),”-”,MID(A1.7,4)) Step 3: In Cell B2, Input the following Function =LEFT(A1,3) Step 3: See next Slide

6 Macro Walk Through CSE 2111 Lecture-Data Validation and Macros 6 Step 4: Display Message: File has been Updated! Click on View Click on Project Explorer Double click on Module1

7 CSE 2111 Lecture-Data Validation and Macros 7 Type this line at the beginning of the VBA Code Type these two lines at the end of the VBA Code Click on Stop Recording


Download ppt "Computer Science & Engineering 2111 Data Validation and Macros 1 CSE 2111 Lecture-Data Validation and Macros."

Similar presentations


Ads by Google