Hey guys, welcome back. So in this video, we're going to see how we can use the cells collection object to affect all the cells within a sheet or within actually our current sheet. So to do that you can write cells, dot and then you can see here that all the methods and properties for the cells collection object, which are actually similar to the ones that we've explained on the range object will actually start appearing, okay, so we can actually write cells dot font dot name, equals Arial. For example, and we can write as well cells dot font dot size, equals, equals 15. For example, okay, so what this is going to do is that is going to change the font name for all the cells in the sheet to be Arial. And it's going to change the font size as well to be 15.
For all the states In the sheet, so I'm actually going to put the value of 10 in some of the cells here, just as a sample. But actually, the changes will not just affect these cells, it will affect all the cells within the sheet but I'm just putting a sample for you. So if you run that, this let's activate the Home tab on the ribbon here you can see here that the fun to skirt and Calibri. So if you run that, you can see here that it's now Arial and the font size is 15. And actually, this is going to be applicable for any cell within the sheets you can see or any cell within the sheet, the phone size is 15 and the font name is Ariel. Okay, so this is basically how you can affect all the cells within a certain sheet.
Okay, which is using the cells collection objects if you use the cells collection object, just right cells dot and then start using any property or method, and that's without specifying a certain cell by inputting a row index and column index, this is actually gonna affect all the cells within your sheet. Okay? So thanks guys for watching this video and I'll see you on the next one.