How to remove extra spaces when I copied cells from Outlook email

arup1032

New Member
Joined
Mar 8, 2016
Messages
10
I watch e problem in excel regularly. I need to copy cell from Outlook email. I generally copy the cells or data from Outlook and paste it into the excel sheet. But When I paste it into the excel file, some extra space remains every time. I am attaching a sheet where I did the same. In the numbers, you will find extra space. How to remove such space at once? I usually need to do it with a large number of cells. Here I only mentioned some samples.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Here in the numbered cell, there is some space before the text. I can use text in the column for that case. But the case is not similar every time. Some cells have 4 spaces before text/number, some have 3 spaces, some have 2, etc.
 

Attachments

  • Sample Image.png
    Sample Image.png
    3.7 KB · Views: 8
Upvote 0
IF B2:B7 are numbers, in C2 copy down.

=Trim(B2)

If macro required.
VBA code:
VBA Code:
Sub Con_nums()
Range("B2:B7").Value = Evaluate("Trim(B2:B7)")
End sub
 
Upvote 0

Forum statistics

Threads
1,214,790
Messages
6,121,608
Members
449,038
Latest member
apwr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top