Some Excel users, especially new comers, may think that you can only use one Excel function at a time in a cell. But the fact is that you can join as many functions as necessary in a cell. You can even nest multiple functions within each other to achieve a certain formula. Let us take some examples.
Example 1.
If you have a date in cell “A1″, you can use the Weekday function to return the day of the week like this:
=WEEKDAY(A1),
But this will only return a number. If you want the name of the day then you can nest the Weekday function within the Text() function to get the name of the day as follows:
=TEXT(WEEKDAY(A1);”ddddd”)
Example 2.
Suppose you have a list of email addresses like this, and you want to extract only website addresses from them:
User1@hotmail.com
User256@yahoo.com
User3@exceldigest.com
Two options that may come to mind is the Right() function and the Mid() function, but the Right() function will require the length of the string from the “@” sign to the end, and the Mid() function will require both the length of the string and its start position and both are not available. So here is one possible solution:
- Use the find() function to get the position of the “@” sign :
- Use the Len() function to get the length of the whole string :
- Nest these two functions within the Mid() function to get the final formula:
=FIND(“@”;A1)
=LEN(A1)
=MID(A1;(FIND(“@”;A1))+1;(LEN(A1)))
Please note that this may not be the optimum solution but it is used here to demonstrate our subject. For example instead of using the Len() function you could only use 255 (maximum string length).
Applies to: Excel 2003







