PROVIDING ACCURATE, RELIABLE AND STRAIGHT TO THE POINT KNOWLEDGE ABOUT DIFFERENT IT TOOLS EXPLAINED WITH PRACTICAL EXAMPLES
Whenever we prepare any report in excel, we have two constituents in any report.
The Text portion and the Numerical portion.
But just storing the text and numbers doesn’t make the super reports. Many times we need to automate the process in the reports to minimize the effort and improve the accuracy.
Many functions are provided by the Excel which work on Text and give us the useful output as well. But few problems are still left on which we need to apply some tricks with the available tools.
THIS WAS AN EXCERPT FROM THE FIRST ARTICLE OF THIS SERIES MANIPULATING TEXT IN EXCEL – PART I
In this articles , we will continue learning many more techniques about the manipulation of text in Excel.
TEXT IS AN INACTIVE NUMBER TYPE[FORMAT] IN EXCEL. ANYTHING STORED AS TEXT [NUMBER OR DATE] WON’T RESPOND TO ANY STANDARD FORMULAS OR FUNCTIONS BUT SPECIALLY DESIGNED TEXT FUNCTIONS. [EXCEPTIONS DO OCCUR IN CASE OF NUMBERS]
CONDITIONAL FORMATTING is the process of formatting in Excel on the basis of the conditions. We can put many conditions in the cell and program the Excel to make the formatting , as desired, if the particular condition is met. Formatting comprises of the foreground color, background color, font, size etc. which are the properties of the text.
It makes the results more readable.
IT IS RECOMMENDED TO LEARN THE BASICS ABOUT CONDITIONAL FORMATTING, IF NOT VERY COMFORTABLE WITH THIS TOPIC.
CLICK HERE TO LEARN ABOUT CONDITIONAL FORMATTING.
Maximum times, we apply the conditional formatting on the basis of values present in the cells. Let us now learn the way by which we can apply the conditional formatting using the Text.
HIGHLIGHTING THE TEXT EQUAL TO SOME VALUE:
Let us find out the cell which contains a text value equal to some SPECIFIED TEXT.
For the example let us take this block of text values in Excel.
HELLO | HOW | ARE | YOU | RED |
GREEN | YELLOW | BLUE | GREY | WHITE |
BIG | BUFFALO | ZEBRA | XYLOPHONE | SMALL |
BLACK | APPLE | MANGO | GUAVA | ONION |
PUMPKIN | OKRA | KIWI | POTATO | SPRING |
Let us try to highlight the cells containing HELLO.
It can be done in two ways.
1. Using the predefined options.
2. Using custom formula.
STEPS to highlight cells using the predefined option:
2. Using custom formula.
STEPS to highlight cells using the custom formula:
For the concept OF CONDITIONAL FORMATTING CLICK HERE.
For the concept OF CONDITIONAL FORMATTING CLICK HERE.
TRUNCATING TEXT in Excel means to cut it down from the various places as per our requirement.
We can take it further creating the task where we can remove any text portion after a certain character such as comma or space or full stop.
So, in Excel we have got some cutting tools which we already discussed in our previous post. [MANIPULATING TEXT IN MICROSOFT EXCEL PART I]
We can do so using the standard and powerful text truncating tools RIGHT, LEFT and MID functions easily.
There are complete articles on each of them how to use and other information. Visit them by clicking the FUNCTION NAME given here.
LEFT FUNCTION has the capability to pick the specified number of characters from the left side of the text.
RIGHT FUNCTION can extract the specified number of characters from the right whereas
MID FUNCTION takes out the specified number of the characters from the middle of the text.
We consider that you are familiar with the functions now.
Let us discuss a few examples how we can extract text.
LET US TAKE A TEXT FOR THE EXAMPLE.
“WOW! IT IS A WONDERFUL DAY” in cell E7.
EXAMPLE 1: TRUNCATE THE TEXT AFTER 5 LETTERS FROM THE LEFT.
GENERALIZED FORMULA TO BE USED =LEFT(CELL CONTAINING TEXT, NUMBER OF CHARACTERS TO BE KEPT FROM THE LEFT)
WHEN IT COMES TO CHARACTERS, SPACE ITSELF IS A CHARACTER. ALWAYS TAKE ITS CARE AS NEGLECTING THE SPACE CAUSES MUCH PROBLEMS SOMETIMES.
THE EXAMPLE.
“WOW! IT IS A WONDERFUL DAY” in cell E7.
GENERALIZED FORMULA TO BE USED TO TRUNCATE THE TEXT FROM THE LEFT FOR A FIXED NUMBER OF CHARACTERS IS
=RIGHT(CELL CONTAINING TEXT, LEN(CELL CONTAINING TEXT) -NUMBER OF CHARACTERS TO BE KEPT FROM THE LEFT)
For the example, we’ll remove the first 5 characters from the left.
THE EXAMPLE.
“WOW! IT IS A. WONDERFUL DAY” in cell E18.
GENERALIZED FORMULA TO BE USED TO TRUNCATE THE TEXT FROM THE LEFT FOR A FIXED NUMBER OF CHARACTERS IS
=LEFT(CELL CONTAINING TEXT, SEARCH(” CHARACTER” , CELL CONTAINING TEXT, 1)
For the example, we’ll remove the text after the full stop.
Let us try to create vertical text in excel.
The vertical text can be the need of any report where we want the heading to be vertical.
TEXT BEING VERTICAL can have two meanings.
1. Vertical text but in the same cell.
2. Vertical text in the different cells.
VERTICAL TEXT IN THE SAME CELL:
Follow the steps to create a vertical text in the same cell.
1. Enter the text normally, where we want to enter.
2. Go to HOME TAB>ORIENTATION>VERTICAL TEXT.
3. The text will become vertical simply. Check out the following picture for the results.
2.VERTICAL TEXT IN DIFFERENT CELLS:
If the text is in cells horizontally and we want to place it vertically we can use the following methods.
Let us take an example where the following text is put in the cells horizontally.
HELLO as shown in the picture below.
USING PASTE SPECIAL
USING TRANSPOSE FUNCTION.
USING PASTE SPECIAL:
STEPS TO MAKE THE TEXT VERTICAL USING THE PASTE SPECIAL FUNCTION
Click OK.
The result will appear as the word HELLO will become vertical .
GIVEN TEXT- HELLO as shown in the picture below.
STEPS TO MAKE THE TEXT VERTICAL USING THE TRANSPOSE FUNCTION.
This section deals with the techniques to STRIKETHROUGH or CROSS OUT the text in Excel.
STEPS TO STRIKETHROUGH OR CROSSOUT THE TEXT IN EXCEL.
Right Click the cell containing the text and choose FORMAT CELLS.
Click OK.
The text will be crossed out.
Look at the final position.
SHORTCUT TO CROSS OUT TEXT / STRIKETHROUGH
We can simply use a simple shortcut to strikethrough or cross out the text by selecting the cell containing the text and pressing CTRL+5.
Appending or attaching the text at the end of text is a frequent requirement in Excel. Also mixing our result with the text snippets and values is required.
Let us find out, how we can append or attach new text at the end.
It can be done in two major ways.
1. USING & OPERATOR.
2. USING CONCATENATE OR CONCAT FUNCTION.
USING & OPERATOR:
The ‘&’ operator is also known as concatenate operator. [CLICK HERE FOR MORE DETAILS ABOUT & CONCATENATE OPERATOR].
EXAMPLE:
Append “.net” after all the text given names.
The names given are
Dave
Abraham
John
Keval
Sadir
STEPS TO APPEND TEXT IN EXCEL USING & OPERATOR
Select the cell where the appended text is needed.
Put the formula as =cell containing text&”text to be attended”
For our example , the formula will be =C6&”.net”
Drag down the formula through the column.
The result is shown in the picture below.
2. USING CONCATENATE OR CONCAT FUNCTION.
CLICK HERE FOR MORE DETAILS ABOUT CONCAT & CONCATENATE FUNCTION].
EXAMPLE:
Append “.com” after all the text given names.
The names given are
Dave
Abraham
John
Keval
Sadir
STEPS TO APPEND TEXT IN EXCEL USING CONCAT AND CONCATENATE FUNCTION
This can be a requirement sometime when we need to count the unique text values in a given data or column. It can be done with a number of ways. Let us discuss a few.
1. USING REMOVE DUPLICATES
2. USING UNIQUE FUNCTION
USING REMOVE DUPLICATES:
This is an option already available in Excel directly and very easy to use.
THIS OPTION IS NOT AUTOMATIC AND SHOULD BE USED ONLY IF WE DON’T HAVE MUCH DATA TO BE ANALYZED.
STEPS TO USE REMOVE DUPLICATES TO COUNT THE UNIQUE TEXT VALUES IN EXCEL
[*KINDLY VISIT HERE FOR COMPLETE INFORMATION ABOUT THE PROCEDURE OF REMOVING DUPLICATES IN EXCEL]
Select the complete data or column where we want to find the number of unique values. [ If we need the original column intact, copy the column and paste it somewhere else. We can perform operations on this column].
Go to HOME>DATA>REMOVE DUPLICATES.
Select the column from the dialog box. We have only one column so choose the column.
After selecting the column, press OK. It’ll leave only unique values in the column.
Now , we can put the formula =COUNTA(FIRST CELL OF COLUMN: LAST CELL OF COLUMN).
It’ll give us the number of unique text values present in the column.
STEPS TO COUNT UNIQUE TEXT VALUES IN A EXCEL USING UNIQUE FUNCTION.
[THE COMPLETE PICTORIAL REPRESENTATION OF THE USE OF UNIQUE FUNCTION IS HERE].
We have to process the information twice to get the desired results. First of all we need to find the unique values.
If we need to extract some specific portion of a text in Excel, we can use our well known MID FUNCTION for this easily.
STEPS TO EXTRACT SPECIFIC PORTION OF A TEXT IN EXCEL
For this option, we can have two situations.
1. We know the starting and ending character number of the portion wanted.
2. We don’t know the character number of the portion to be extracted but we know the condition.
STEPS TO EXTRACT TEXT IF WE KNOW THE CHARACTER POSITION:
We can simply use the MID FUNCTION for this situation.
EXAMPLE:
Extract the text from character 5 to 7 from the given text.
how are you?
Follow the steps
Suppose we have the given text in cell E7.
Select the cell where we want the output.
Put the formula as =MID(E7,5,7)
The result would appear as ‘are’.
The process is shown in the picture below.
COUNTIF FUNCTION counts the values with certain given conditions for example, if any number is smaller than a particular value, or larger than a fixed value or equal to any text etc.
In this section we would focus upon the text portion.
Let us find out with the help of examples, how we can apply COUNTIF to extract useful information from the data.
EXAMPLE 1: COUNTING THE NUMBER OF REPETITIONS OF A PARTICULAR TEXT IN EXCEL
WASHINGTON
PARIS
DELHI
DELHI
WASHINGTON
MOSCOW
ROME
ROME
MOSCOW
STEPS TO FIND THE NUMBER OF REPETITIONS OF A PARTICULAR TEXT
Select the cell where you want the result.
Put the function as =COUNTIF(RANGE,”TEXT”)
For our example, the formula will be =COUNTIF(F3:F11,G3) for the first example where we are trying to find out the number of times WASHINGTON is repeated. [ The first argument is the array reference which covers all the data in which we have to find out the repetitions. The second argument is the condition which we want to find. In our case we have put the reference of the text we want to find.
We can also put “WASHINGTON” directly.
THE COMPARISON OF TEXT VALUE IN THE COUNTIF FUNCTION IGNORES THE CASE AND TREATS UPPER AND LOWER CASE AS EQUALS.
EXAMPLE 2: COUNTING THE RESEMBLING WORDS IN EXCEL
Suppose we have the following group of words and we need to find out the resembling words.
A word can resemble in many ways.
Many words can have same prefixes, same suffixes, any pattern
Let us try different combinations.
GENERAL FORMULA TO COUNT THE WORDS HAVING SAME PREFIX:
=COUNTIF(RANGE,”PREFIX*”) PREFIX is the letters of the prefix.
GENERAL FORMULA TO COUNT THE WORDS HAVING SAME SUFFIX:
=COUNTIF(RANGE,”* suffix”) suffix are the letters of the suffix.
GENERAL FORMULA TO COUNT THE WORDS HAVING SAME PATTERN:
=COUNTIF(RANGE,”*pattern*”) pattern is the text pattern.
GENERAL FORMULA TO FIND OUT THE WORD WHICH IS MISSING ONE LETTER.
=COUNTIF(RANGE,”lett?rs*”) The letter at ? will be taken in to consideration and all possibilities will be counted.
Let us try these formulas in the examles.
DATA GIVEN:
KIT |
HIT |
FIT |
LITE |
LIGHT |
KITE |
MITE |
MITTEN |
KITTEN |
SICK |
WICK LET |
STEPS TO COUNT THE WORDS WITH SAME PREFIX.
STEPS TO COUNT THE WORDS WITH SAME SUFFIX.
STEPS TO COUNT THE WORDS WITH SAME TEXT PATTERN.
STEPS TO COUNT THE WORDS WITH WILDCARD CHARACTER.
THE COMPARISON OF TEXT VALUE IN THE COUNTIF FUNCTION IGNORES THE CASE AND TREATS UPPER AND LOWER CASE AS EQUALS.
OTHER WAYS TO REACH THIS ARTICLE
YOU MAY LIKE