From the course: Excel: Learning VBA
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Write a value to a cell - Microsoft Excel Tutorial
From the course: Excel: Learning VBA
Write a value to a cell
- [Instructor] One way to display the results of a visual basic procedure is to write a value or values to one or more cells. In this movie, I will show you two ways to do that. My sample file is 05_01_Writing and you can find it in the chapter five folder of the exercise files collection. This workbook contains a single worksheet and I have two different sections for it. Over on the left you can see, that I have a list of different types in this case of olive oil, and then also unit sales. And that's just a total of the sales values. I'm going to use VBA to add another column header and that will expand the table. To move over to the Visual Basic Editor, I will press Alt F11 and I am in module one for my code. And I'll take a look at the code module or procedure that is on top. It's called write value, and what it does stepping through, is to take the string address of D6 and then write the word commission as the value…
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)
-
-
-