Excel tutorial : Range in Excel
What is a Range ?
Letus now understand what is a range, in general we refer range as having two points, that is a starting and ending point, similarly in Excel range refers to all the cells within the specified starting and ending points.
Range("A1:A8"), Range starting from Cell A1 and ending at cell A8, that is 8 cells selected.
Setting name to Range of cells:
We can set name to Range of cells for easy reference in formulas, image above shows how to set name to a range of cells
1. Click on formulas tab in Ribbon
2. Click on "Name Manager" - a names manger dialog box will open
3. Enter name to your range of cells, in the above example I have enered "rng_business_countries"
4. Select the scope of name, you can restrict scope to any one of tab or extend the scope of name to entire workbook, in my example above I selected workbook as the scope, so that I can enter name in any of the worksheets or in vba code.
5. verify the cells that is referring to the range in the box just above the OK button.
6. Click OK, thats all your range is given a name now.
How to use Range Name in formulas :
You can use name instead of entering cell reference
above formula counts number of values in range name entered = 8
you can use name of range in any of formulas such as vlookup, sum, sumif, etc..
if you want to edit the cells count referring the name, you can use name manager and edit the range "A1:A8" alter it accordingly all the formulas will refer to the new cells range- easy.