Lookup Functions
Function Row()
Function Column()
Function Address()
Lookup Functions - New list of functions released
Solve this email query - populating values based on max value
Free e-Book: "Excel Matic - Excel Math Functions"
A re-visit to Math Functions
Inviting questions related to Excel
Concept of Data Validation
How to calculate subtotals using Array functions
Sunday, July 26, 2009
Function Choose()
- If cell A1 = 1 then the cell B1 will show - One
- If cell A1 = 3 then the cell B1 will show - Three
- If cell A1 = 7 then the cell B1 will show - Seven
- If cell A1 = 5 then the cell B1 will show - Fice
Lookup Functions
Read more...
Thursday, July 23, 2009
Function Row()
This function is used to determine the row number of a given reference (the cell referred to in the function).
Syntax:
= Row (Reference_cell)
Reference_cell: This is the cell for which the row number is to be determined
Examples:
The function simply returns the row number for the cell which is passed on as reference with the function. For example:
- Row($A$3) - result will be: 3
- Row($C$35) - result will be: 35
- Row($AA$45) - result will be: 45
- Row($BB$125) - result will be: 125
=Row()
...and the function will return the row number of the cell in which it is contained.
Application:
Though this function is very simple to use, but is a very useful functions. This functions is mostly applied with other advanced lookup functions, such as vlookup(), hlookup(), address(), etc. This functions works similar to Column() function. Read more...
Wednesday, July 22, 2009
Function Column()
This function is used to determine the column number of a given reference (the cell referred to in the function).
Syntax:
= Column (Reference_cell)
Reference_cell: This is the cell for which the column number is to be determined
Examples:
The function simply returns the column number for the cell which is passed on as reference with the function. For example:
- Column($A$3) - result will be: 1 {as column A is the first column}
- Column($C$35) - result will be: 3
- Column($AA$3) - result will be: 27
- Column($BB$3) - result will be: 54
=Column()
...and the function will return the column number of the cell in which it is contained.
Application:
Though this function is very simple to use, but is a very useful functions. This functions is mostly applied with other advanced lookup functions, such as vlookup(), hlookup(), address(), etc. Take a look at this query which I received from one of the readers of the Excel Matic. I have made use of this function. (Note that the example uses a few functions which are not yet described on Excel Matic, but will soon be). Read more...
Monday, July 20, 2009
Function Address()
This function is used to custom build a address range in Excel. It converts a text into actual address based on given parameters. The function can return address for a single cell and a range of cell as well.
Syntax:
= Address (Row_num, Column_num, Reference_type, Address_type, Sheet_name)
Row_num: This value determines the row number that the address should refer to
Column_num: This value determines the column number that should be referred by the address
Reference_type: This single-digit parameter determines which type of reference should the address have. The reference codes are - 1=absolute reference, 2=absolute row/relative column reference, 3=relative row/absolute column reference and 4=relative reference. The default reference is 'Absolute' reference
Address_type: This value determines the style of address that should be returned. There is no effect of this parameter on its functioning. The address type codes are - 1 or TRUE = A1 type reference, 0 or FALSE = R1C1 style reference. In case this parameter is not available, the function adopts the A1 style reference, even if R1C1 is the default style in the sheet
Sheet_name: As the name suggests, this parameter provides the sheet name which should be included in the address as its part. This is used when the address should refer to a range which is external to the given sheet
Note: In the above syntax, Reference type, Address Type and Sheet name are optional parameters. Any of these can be mentioned in the function independent of each other
Examples:
Here are a few examples of using Address() function
- Address(1,2) - result will be: $B$1
- Address(2,1) - result will be: $A$2
- Address(2,1,1) - result will be: $A$2
- Address(2,1,2) - result will be: A$2 (note the reference style, the reference to column 'B' is not absolute)
- Address(2,1,4) - result will be: A2
- Address(2,1,1,1) - result will be: $A$2
- Address(2,1,1,TRUE) - result will be: $A$2
- Address(2,1,1,0) - result will be: R2C1
- Address(2,1,1,FALSE) - result will be: R2C1
- Address(2,1,1,1,Sheet1) - result will be: Sheet!$A$2 (note that the address now contains sheet name also)
- Address(2,1,1,1,Sheet_new) - result will be: Sheet_new!$A$2
- Address(2,1,,1) - result will be: $A$2 (note that the third parameter has been ignore, but its place holder remains there as a blank indicated by 2 commas)
Sunday, July 19, 2009
Lookup Functions - New list of functions released
These functions are used in lot of applications, their demand in today's market is very high, one of which is financial industry. And not just financial research, these functions are very famous in other industries also, at all those places where there is high use of Excel spreadsheets. So, knowledge of these functions and their application will provide you with an edge to clear the interviews and also will make you feel confident in using these functions.
So, I will be writing on one function in every 2 days, so that you guys can get time to catch-up with each function and understand it properly. Also, starting from these functions, going forward I will also talk about the application of each of these functions, together with examples. This will provide you with some live examples of using each of these functions. In case you would like to submit any cases which you think could be suitable examples for these functions, do let me know. I will put them up as sample applications.
To start with, today I have written about Address() function and have also mentioned its application with its explanation. Read more...
Friday, July 17, 2009
Solve this email query - populating values based on max value
Monday, July 13, 2009
Free e-Book: "Excel Matic - Excel Math Functions"
PS: For those who are already subscribed to Excel Matic's feed, you would have already received your copy of the free e-Book.
Read more...
Saturday, July 11, 2009
A re-visit to Math Functions
Randbetween() functions is available in Excel 2007 (and is not there in Excel 2003). Rand() is used to generate a random number between the range of 0 to1 and is a decimal number. Whereas, Randbetween() returns random integers between the range provided by the user.
Friday, July 10, 2009
Inviting questions related to Excel
Saturday, July 4, 2009
Concept of Data Validation
Data Validation is a tool provided by MS Excel that allows you to validate data that is entered by a user. The validation happens once the user enters data and hits the return key (enter key).
Why should I use data validation?
Data validation, though a simple tool, can be of lots of help. It’s very core function (of validating data) can be applied to many other tasks. Here are a few things that can be done using data validation tool:
- The very basic function of data validation is to validate the data. This tool can be used to get correct data from the users. It can also be used to get desired data, by the way of limiting the cell input using custom input
- In large shared spreadsheets, which are updated real-time by more than one user, certain columns can have restricted data entry. This can limit the incorrect entries to the cells
- Keeping a check on inconsistencies. This can be achieved by creating a list of certain words, which go in a certain range of cells and these can be suggested to users by giving them an option to select from drop-down menus. These in-cell drop down menus can be created using data validation
- Custom error / alert / input messages can be displayed to users after or before a cell entry is made. Error messages are shown when an incorrect entry is made. The input message is shown when a certain cell is selected, where the input is required. On selection a message can be displayed which can show instructions or warnings etc.
- In-cell drop down menus. This is one of the most useful and my favorite uses of data validation
As I told earlier the cells entries can checked for many types of validations. For example, I can restrict a certain range of cells to accept only numeric value; I can also limit the range within which the cell values can be input. I can also restrict the cells to accept only date values or time values, etc.
Here is a detailed explanation of what exactly you can do with this tool:
Validations: The first tab of the data validation tool is where you can define you validation rules. These are the following rules that can be applied on the cell or range of cells –
- Whole numbers: You can use this option in case you want the cell to accept only whole numbers as input from the users. You can also define certain limits to the whole numbers also, such as minimum and maximum limits of the range, which is acceptable, other rules such as equal to, more than, less than, not equal to, etc.
- Decimal numbers: This option allows you to restrict the cells to accept numeric values, which can also have decimal values. The difference between this option and the previous option is that, in previous option only whole numbers could be input and with this option you can allow decimal numbers also. You can apply same rules on the decimal values as you can apply on whole numbers.
- Date / Time: These are 2 different options with which you can restrict the cell entries to be either date or time value. Again, on these options also you can apply equal to, not equal to, more than, etc. rules
- Text Length: This option restricts the cells to contain only a limited length of text. The text here includes all valid characters in Excel.
- List: This option allows you to validate the cell entry with a pre-defined list. You can define your list, with words or phrases, which you wish should only be entered in the cells. This option allows you to provide the user as in-cell drop down menu with which one can select a particular item from the list. This way you can restrict the data input in the cell together with giving the user a drop down list of required items.
How to apply data validation?
The following steps will guide how one can apply data validation to a range of cells. The following steps can be applied in Excel 2003 and Excel 2007 as well:
- Select the cell or range of cells to which data validation is to be applied
- Go to 'Data' menu and then click on 'Validation'. The Data validation wizard will open up
- On the validation tab, click on the drop down menu, where currently 'Any Value' is shown. Currently, the cell can accept any value
- You can choose from the various validations that are available in the drop down list
- Once you select the validation type, another drop down list will show up (depends on which option you selected on previous step) which will list the various rules that can be applied on the validations
- In case you would like to activate Alert or Error messages, those can be defined in the next tabs
Wednesday, July 1, 2009
How to calculate subtotals using Array functions
Example:
In our example, we have some data related to sales of 3 products - Product A, Product B and Product C. The sales force is active in all 4 geographic regions - East, West, North and South. Now we need create a small report (just 4 cells of data) that will summarize the whole data. This report will have subtotals by Region and Product. Follow the below steps for this:
- Create an Excel spreadsheet with some sample data (alternatively you can download this spreadsheet) which has these columns - Region in column A, Product in column B and Sales in column C. Also, fill some sample data for these 3 columns
- Create a small matrix table with columns titled as each product and rows titled as each region. The matrix should look something like this:
Let us now try to formulate one single formula for subtotals that can be used with all the cells in the matrix. Here is the formula that I used for calculating the totals for each cell in the above matrix:
=SUM(IF($A$2:$A$29=$E6,IF($B$2:$B$29=F$5,$C$2:$C$29,0),0))
..and i entered this function as an array function, i.e. using CTRL+Shift+Enter
Let us understand what does each part of the formula does.
- =SUM(IF($A$2:$A$29=$E6,IF($B$2:$B$29=F$5,$C$2:$C$29,0),0))
This portion of function gets executed first. This part checks if the Product column has 'Product A' in it. If yes, it lets the first cell go for next level of validation (next step of calculation), If the cell does not have 'Product A', then 0 value is passed on to next level
Note: I hope you remember I discussed in my previous post that array functions process each cell at a time. To refresh your concept read more about Array Functions here and here. - =SUM(IF($A$2:$A$29=$E6,IF($B$2:$B$29=F$5,$C$2:$C$29,0),0))
Similar to previous part of the formula, this part check the cell for Region. If the cell has region as 'East'. If true, then the cell is passed on to next level of formula, i.e. Sum() function. If the cell does not have 'East', then 0 value is passed on to next level - =SUM(IF($A$2:$A$29=$E6,IF($B$2:$B$29=F$5,$C$2:$C$29,0),0))
Here, the value passed from previous 2 steps gets accumulated and is added up. (Learn more about Sum() Function and other Math Functions)
Now, you copy and paste this formula to other cells of the matrix and you will get the required results.
Note: The formula will take required cells from the column and row heads for validation by itself. This has been done through using 'Relative Reference' technique of writing formula in Excel. I will take this up in my later posts.
Read more...