Affecting all cells within a sheet

Excel VBA for Beginners 4-The Cells Collection object for dealing with Cells
2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€85.55
List Price:  €119.77
You save:  €34.22
£74.16
List Price:  £103.84
You save:  £29.67
CA$137.94
List Price:  CA$193.12
You save:  CA$55.18
A$152.78
List Price:  A$213.90
You save:  A$61.12
S$128.67
List Price:  S$180.14
You save:  S$51.47
HK$780.19
List Price:  HK$1,092.31
You save:  HK$312.11
CHF 80.30
List Price:  CHF 112.42
You save:  CHF 32.12
NOK kr1,004.34
List Price:  NOK kr1,406.11
You save:  NOK kr401.77
DKK kr638.63
List Price:  DKK kr894.11
You save:  DKK kr255.47
NZ$170.14
List Price:  NZ$238.20
You save:  NZ$68.06
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,172.20
List Price:  ৳17,041.56
You save:  ৳4,869.36
₹8,825.07
List Price:  ₹12,355.46
You save:  ₹3,530.38
RM422.33
List Price:  RM591.28
You save:  RM168.95
₦152,828.71
List Price:  ₦213,966.31
You save:  ₦61,137.60
₨28,385.35
List Price:  ₨39,740.62
You save:  ₨11,355.27
฿3,218.97
List Price:  ฿4,506.69
You save:  ฿1,287.72
₺4,125.04
List Price:  ₺5,775.22
You save:  ₺1,650.18
B$544.72
List Price:  B$762.63
You save:  B$217.91
R1,768.44
List Price:  R2,475.88
You save:  R707.44
Лв167.48
List Price:  Лв234.49
You save:  Лв67
₩139,005.46
List Price:  ₩194,613.20
You save:  ₩55,607.74
₪333.96
List Price:  ₪467.56
You save:  ₪133.59
₱5,689.88
List Price:  ₱7,966.06
You save:  ₱2,276.18
¥14,815.95
List Price:  ¥20,742.93
You save:  ¥5,926.97
MX$1,867.49
List Price:  MX$2,614.56
You save:  MX$747.07
QR364.04
List Price:  QR509.67
You save:  QR145.63
P1,439.16
List Price:  P2,014.89
You save:  P575.72
KSh12,918.70
List Price:  KSh18,086.70
You save:  KSh5,168
E£4,854.53
List Price:  E£6,796.54
You save:  E£1,942
ብር14,306.63
List Price:  ብር20,029.86
You save:  ብር5,723.22
Kz91,186.39
List Price:  Kz127,664.59
You save:  Kz36,478.20
CLP$97,214.27
List Price:  CLP$136,103.87
You save:  CLP$38,889.60
CN¥713
List Price:  CN¥998.24
You save:  CN¥285.23
RD$6,340.36
List Price:  RD$8,876.76
You save:  RD$2,536.40
DA12,985.04
List Price:  DA18,179.58
You save:  DA5,194.53
FJ$225.61
List Price:  FJ$315.87
You save:  FJ$90.25
Q767.35
List Price:  Q1,074.33
You save:  Q306.97
GY$20,923.93
List Price:  GY$29,294.34
You save:  GY$8,370.41
ISK kr12,250.77
List Price:  ISK kr17,151.57
You save:  ISK kr4,900.80
DH907.55
List Price:  DH1,270.61
You save:  DH363.06
L1,676.34
List Price:  L2,346.95
You save:  L670.60
ден5,281.40
List Price:  ден7,394.17
You save:  ден2,112.77
MOP$803.54
List Price:  MOP$1,124.98
You save:  MOP$321.44
N$1,773.82
List Price:  N$2,483.42
You save:  N$709.60
C$3,680.31
List Price:  C$5,152.59
You save:  C$1,472.27
रु14,096.01
List Price:  रु19,734.98
You save:  रु5,638.96
S/352.21
List Price:  S/493.11
You save:  S/140.90
K423.82
List Price:  K593.36
You save:  K169.54
SAR375.17
List Price:  SAR525.26
You save:  SAR150.08
ZK2,380.02
List Price:  ZK3,332.12
You save:  ZK952.10
L434.52
List Price:  L608.35
You save:  L173.82
Kč2,090.29
List Price:  Kč2,926.49
You save:  Kč836.19
Ft33,616.37
List Price:  Ft47,064.26
You save:  Ft13,447.89
SEK kr940.94
List Price:  SEK kr1,317.36
You save:  SEK kr376.41
ARS$136,236.96
List Price:  ARS$190,737.20
You save:  ARS$54,500.23
Bs691.36
List Price:  Bs967.94
You save:  Bs276.57
COP$399,414.69
List Price:  COP$559,196.55
You save:  COP$159,781.85
₡50,561.46
List Price:  ₡70,788.07
You save:  ₡20,226.60
L2,620.33
List Price:  L3,668.57
You save:  L1,048.24
₲720,925.20
List Price:  ₲1,009,324.12
You save:  ₲288,398.92
$U4,006.62
List Price:  $U5,609.43
You save:  $U1,602.81
zł363.92
List Price:  zł509.51
You save:  zł145.58
Already have an account? Log In

Transcript

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.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.