Join Curt Frye for an in-depth discussion in this video Returning part of a string, part of Up and Running with VBA in Excel.
Even though most users think of Excel as a number-crunching application,…which it is, a surprising amount of your VBA Code will have to deal with character strings.…In the previous movie, I showed you how to combine strings into longer strings.…In this movie, I'll show you three functions that let you assign parts of longer…strings to other variables.…But before I do that, I am going to create formulas that use the functions I'm…going to create, so you can see how they work.…First, I will find the Year, and the function that I have created is called…CaseYear, and I will be deriving that from the value in cell A2.…
When I press Tab, I get the year of 2010.…That is the first four characters of the Case Code.…Next, I have the Variety.…For that, I have the OilType function. Again, we're deriving the value from A2. That is L9.…That's the middle two characters here.…And then finally, we have the Batch, equal BatchNo, again from cell A2. Press…Enter or Tab, your choice, and we get 300, which is the BatchNo, and that is the…
- Working in the Visual Basic Editor
- Adding code to a macro
- Creating, exporting, and deleting code modules
- Declaring and using variables
- Managing variable scope
- Defining arrays
- Managing workbooks and worksheets with VBA
- Repeating tasks with loops
- Debugging VBA code
- Cutting, copying, and pasting cell data
- Running and triggering event procedures
Skill Level Advanced
1. Introducing Visual Basic for Applications (VBA)
2. Defining Variables, Constants, and Calculations
3. Adding Logic to Your VBA Code
4. Debugging Your VBA Code
5. Managing Workbook Elements and Data in VBA
6. Adding Advanced Elements to Your Workbook
7. Using Excel Events in Your VBA Code
8. Putting It All Together
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.