 back to another video. So this video is probably going to be shorter than normal as the actual topic we're going to be covering doesn't take that long. But I just wanted to give it its own dedicated video just to step through and explain the why's and the what's as we're going to use this particular format in videos going forwards. So what we'll do is actually if I add some code in here it'll help to first explain. As always I'll put this into a module and we're going to just do create a subroutine. So recall this sheet underscore ref. So in previous videos when we've been trying to refer to a particular range, and for me I'm going to do cell a one of sheet one. We've had to do something like this. So we had to go define first what the sheet is so going sheets, it's going to be sheet one. And then we've gone obviously gone in and done I'm going to do a cells one dash one dot value equals hello. So this simple piece of code is going to just populate the value hello in cell a one here for us. I mean just hit f five to run that and make sure it is indeed correctly working. So we could continue to just populate all of our or define all of our ranges as we've done here. And let's say we then had something else to do here as well. We could then also put sheets sheet one dot cells. And this time let's do it in the next one. Let's go there dot value equals goodbye lack of lack of creativity or what to put in there and we run this and we can now see that next row has got the word goodbye in it. We can tidy our code up ever so slightly by actually storing this reference of sheet number one as a variable as we have done previously in other videos where we're just been storing things like numbers and text. In order to do so we start off very much the same as all the others where we have to find what the variable type is. So for this it's going to be dim and we're going to call this one and you can be again more creative with your name and conventions SHT one as a work sheet. And then the next part again is very similar to what we've done with the numbers and stream at this time we have to actually use the word set so we're actually setting what that variable or the value is or the reference should I even say in this example. So we're going to put set and we're going to put SHT one equals and it's going to be sheets sheet one. So one way to look at this is we're literally just saying we're going to store this first part as this value here and then yeah the rest of this can then continue as it is in this example we're going over anyway. So we've got our variable defined so all we now need to do is simply remove this whole first section here and actually rather than do that I'm going to just get rid of this whole code here and enter it again. So rather than this time typing in sheet sheet one when we're referring to this row two value of goodbye all I need to do now is type in our variable so SHT one and we're going to put oh no we're out of space so SHT one dot cells so you can see it's already understood that our shorthand here or our variable has been defined as a worksheet so it's given us all the drop-down options available to us had we coded in this above example. So cells and we're going to do two one close brackets dot value equals goodbye like so so we can see that it's already a lot short again by all of these characters we have here if we now run this again if we clear the values that might help so you can actually see it's doing something here five you can see the values are now populated in there for us so again another tidy way of doing our code rather than having to type out this every time and as you can appreciate it's a lot easier quicker more efficient to type out four characters than it is to repetitively keep typing this every time and just update this review SHT one and that has automatically been stored for us as well so we clear that hit F5 over here again and you can see it's working for us as designed if we add another sheet and we haven't actually touched on this in other videos so at the moment you can see I've just got sheet one there and then this workbook if I'm to add another sheet you can see how that sheet is automatically added in here so we have it available to us in our sort of navigation pane over the side but we don't need to worry about that we're going to stay obviously module one but if this time and just to mention obviously this tab here says sheet number five as you see on the side here this is only because I have been playing around with this workbook prior to actually recording this video if you're in a new fresh workbook then obviously it would then tell you sheet number two and every sheet you added would incrementally go up by one so if I added another one now you'd see that it goes up to number six just to touch on that if you're confused why it suddenly said sheet number five there so we've now got another sheet we need to reduce six I don't need that so we now got this new sheet number five so we now want to start populating something in there as well if we wanted to find that again same with what other variables we looked at we can just utilize this first then we've got the top here add a comma so we'll call this sht five as a worksheet oh if I go well worksheets yep we need to come down here and we can now go set sht five equals sheets and we'll go into sheet five close brackets like so and then this time we can do something different we'll go sht five dot cells put in the first one dot value equals hello number five or hello sheet hello sheet okay so now when we run this as you probably assume yeah it's going to obviously update for us as required so the purpose of today's video really was to go over that I might have dragged it out longer than it needed to be but the intention was for this video to be shorter than normal I just wanted to do a dedicated video on this topic as we're going to be using this these references going forward rather than typing out each time the actual sheet reference so I hope you found that video useful if you did please do give this video a like as it would be greatly appreciated by me and it also does help that youtube algorithm and lastly if it's the first time watching any of our videos or you have watched previous ones and you've not yet subscribed please do subscribe to the channel and also make sure you hit that bell notification button as they will obviously notify you of all of our future videos as they come out and again it'll be highly appreciated and beneficial to the channel as well so thank you very much for watching and we'll see you in the next video