Sunday, April 17, 2011

Naming Cells and Cell Blocks

Ever Wondered B23 in a complex Excel file belongs to what or what does A11+C2 mean? I found this very confusing at times and then had to do some reverse engineering of the formulae in the sheet to understand the real meaning. Recently I came across a very simple feature in Excel by which you can name any cell or a block of cells and then use these user friendly names in you equations.



Sample Problem: For given Sales and Expenses I want to calculate profit and want to look my Excel formula more readable.

Solution:
STEP 1: In Excel sheet fill data for Sales and Expenses as shown in the figure and create a third row for calculating profit.
STEP 2: Highlight the box containing value of Sales(B1) and then type 'Sales' in the box name section as highlighted in red color. This is it! Now instead of B1 we can use 'Sales' in our calculation. Do the same for Expenses in B2 and for Profit in B3.
STEP 3: Write the following formula in 'Profit' cell as shown in the below figure: =Sales-Expenses



You should be able to see the correct value of Profit in the respective cell and the formula looks much better than =B1-B2

Similarly we can name a block of cells and then use in our calculations.

Sample Problem: I want to calculate the total of my marks in all the subject and the formula should look readable.
Solution:
STEP 1: Fill Some relevant data in Excel as shown in below figure and then select the cells for which you want to get the total.
STEP 2: With the above mentioned cells selected type a relevant name in the Cell Name box. e.g. 'Marks'



STEP 3: In the cell for Total type the following formula as shown in the figure: =SUM(Marks)

No comments:

Post a Comment