From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Return part of a string - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Return part of a string
- [Instructor] 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 this movie, I will show you how to assign parts of longer strings to a variable. I will also describe two new functions that were recently added to Excel that might replace what I show you in VBA. My sample file is "05_06_CutStrings" and you can find it in the Chapter 5 folder of the exercise files collection. Over on the left, I have a set of case codes in column A and those case codes referred to cases of olive oil and they're broken down into three bits of information. The first is the year, the second is a variety, and the third is the batch. And the idea is to find the year, variety, and batch as individual values and add them to columns B, C, and D in the workbook. I created some functions to illustrate the technique and what I'll…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Write a value to a cell4m 29s
-
(Locked)
Cut, copy, and paste cell data6m 51s
-
(Locked)
Find values in cells5m 7s
-
(Locked)
Refer to cells using the OFFSET property5m 1s
-
(Locked)
Concatenate text strings4m 4s
-
(Locked)
Return part of a string6m 15s
-
(Locked)
Manage worksheets with VBA8m 30s
-
(Locked)
Manage workbooks with VBA6m 41s
-
(Locked)
Challenge: Manage workbook elements and data in VBA2m 53s
-
(Locked)
Solution: Manage workbook elements and data in VBA3m 8s
-
(Locked)
-
-
-