This is a direct continuation of VBA syntax and expression entry Part 1. I'm going to continue talking about how we can write syntax in VBA, so I'm going to continue with string concatenation. String concatenation is performed using an ampersand symbol. This is Shift 7 on my keyboard. The ampersand is used to join two strings. Let me go over an example of this. This example is also in that file called VBA syntax example, so you can work along if you'd like. I'm looking at this string concatenation subroutine. We're dimming y as a double, so y is going to be 3.4, and maybe I want to output in a message box, I want to output a number in-between two other strings. We can concatenate or use the ampersand sign to do that. We have, this is how we can put & y, which will be 3.4 & in-between two strings. Importantly, when you're concatenating strings with numbers, makes sure to put blank spaces here before this first quotation and after the second quotation, otherwise, that number is gonna be jammed right up against the text. I can put my cursor in here. Let's just press "F5" to run that. This is how we can put 3.4 in-between two strings. That's an example of how you can concatenate a string and a number. Another example, this is in subrange concatenation. Sometimes you might want to concatenate a letter, for example, the letter of a column on the spreadsheet with a row. I've dimmed x as an integer, y, is dimmed here as a string because that's going to be a letter. x is three, y is the letter C, and then I can say range y & x, so that'll be C3 is equal to "Hello." Like I mentioned in Part 1, you're going to learn a lot more about how you can use range properties here. But this is going to place "Hello" that string into cell C3 on our worksheet. Let's go ahead and run this. F5 switchover to the worksheet, and we've placed in cell C3, we've placed that text. Now let's talk about relational operators. We have greater than, less than, greater than equal, less than equal, equal and not equal to. These are logical operators in that oftentimes you're asking a question, you're basically asking, is a greater than b or is x equal to y? Related to relational operators and logic, we can use logical operators Not, And, and Or. Let me show you an example of relational operators and logical operators. This is available in Module 2 of that starter file. We're going to dim a as an integer, b, c, d also as integers. I'm just setting variables a through d, 1 through 4. Usually when you're performing these logical or relational operators, you're using an if statement. For example, if a greater than b, if that's true, then we're going to do whatever comes after that then statement. If it's false, then we're not going to go into that then statement, that then part of the statement. Let's just look at these first two if statements. Put my cursor in there. Let's press "F8". a, b, c, and d are all taken up into the Locals Window. Now we know a is equal to 1, b is equal to 2, that a is not greater than b, so this should be false. If I press "F8", we're not going into the second part of this line, so we're not going to display this message box. Instead, we just move along to the next line. Now c is equal to 3, d is equal to 4, so 3 is less than d. That is true, so we're going to message box this, c is less than d. Let me stop there and let's talk about the second part of this. Now I have an Or logical operator and I have an And here in these last two lines. In order for an Or statement to be true and for us to display this message box, "Yay!", one or the other, or both of these have to be true whatever's on the left and right sides of that Or statement. If a greater than b, so we know that that's false, or c less than d, we know that that's true. At least one of those is true, we're going to message box, "Yay!". That line we should be messaged boxing, "Yay!". Now if we look at the last line here, in order for an And to be true and for us to display "Hooray!" in this case, both of those on the left and right-hand side of the And statement have to be true. Because a is not greater than b, both of these are not true and we're not going to display that message box. Let's run through this. Just as a shortcut for us to be able to get to that second to last line, I'm going to put a breakpoint in there. I'm going to press "F5", so we display that message box. Now let's run this line. Press "F8". If a greater than b or c less than d, we said that at least one of those is true, so we're going to display that message box "Yay!". Then we go into the next line. You see that both of those are not true, so it didn't go into that second part. It did not display that "Hooray!" message box and then we end our sub. This shows how we can use logical and relational operators in VBA code, and you'll be learning a little bit more about these as we work through examples in this course.