Unnecessary Blank Characters in Cells in Excel 2010

 

In this article we will learn how to delete the unnecessary blank character from a cell, we will use “TRIM” function in Microsoft Excel 2010.

TRIM: Trim function is used to remove additional leading and trailing spaces from the text in a cell.

Syntax of “TRIM” function: =TRIM (text)

Example:

  • Cell A2 contains the text“Excel Tips”
  • Enter the formula in cell B2 =TRIM(A2), press Enter on your keyboard
  • The function will return the text after deleting the unnecessary spaces.

img1

Let’s take an example to understand how and where we can use TRIM function.

For Example:- We have 2 data sets, 1st data is having all details, and we want the 2nd data to pick the date of joining, by using the Employee name.

img2

Employee names are with spaces, and we will use here TRIM function along with Vlookup function.

Follow below given steps:-

  • Write the formula in cell F2.
  • =VLOOKUP(TRIM(E3),A2:B7,2,FALSE)
  • Press Enter on your keyboard.
  • The function will return Date of Joining for agent.

img3

  • Copy the formula by pressing the key Ctrl+C and paste in the range F3:F7 by pressing the key Ctrl+V on your keyboard.

img4

This is the way we can use TRIM function for our data in Microsoft Excel.



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>