Thursday 12 December 2013

Excel Basic Array - Naming an Array Constants.

Naming an Array Constants:


Naming an Array Constants : It is similar  as you define name for cell, range of cells, constant values, you can also define name for an Array constant .

Method for defining name :-  From Formula Tab -->> Click Define Name . New name dialogue box appears.
 
Example :- In the New name dialogue box ,In name box, type weekdaynames as for example. 
and in refers to box , type ={"mon","tue","wed","thurs,"fri","sat","sun"} . click ok.

After creating this named array, you can use it in a formula.
  •  Select horizontal cells,lets say A1:G1, (as the separation of items in array is by comma) .
    In the formula bar type =weekdaynames and press ctrl+shif+enter. It would be appear as {=weekdaynames}.And the selected range is filled with mon in A1, tue in B2 and so on.
  • Likewise, you can also use it other function, like with TRANSPOSE function , in this Select vertical range,A1:A7, as TRANSPOSE function is used to convert horizontal range to vertical range and vice-verse . In the formula bar, type =transpose(weekdaynames) and press ctrl+shift+enter . It would be appear as {=transpose(weekdaynames)}. And the selected range is filled with mon in A1, tue in A2 and so on.


No comments:

Post a Comment