ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   erasing space/blank in a cell (https://www.excelbanter.com/excel-programming/422505-erasing-space-blank-cell.html)

thread

erasing space/blank in a cell
 
Hi
i'm doing alot of vlookup work and very common to facea problem in
linking becaouse of additional space or blank line
does anyone have an idea how can it be overcomed?

Eduardo

erasing space/blank in a cell
 
Hi,
try this, highlight the column where you have the information, ctrl H, that
will take it to the replace screen, let's say you have 1 blank space, in find
what press the space bar one , then tab to replace with, don't do anything
here and press replace all. hope this help

"thread" wrote:

Hi
i'm doing alot of vlookup work and very common to facea problem in
linking becaouse of additional space or blank line
does anyone have an idea how can it be overcomed?


[email protected]

erasing space/blank in a cell
 
On 15 Jan., 15:17, thread wrote:
Hi
i'm doing alot of vlookup work and very common to facea problem in
linking becaouse of additional space or blank line
does anyone have an idea how can it be overcomed?


Hi,

there is a function called trim. This enables you to take out all the
spaces at the beginning of the cell. Maybe that one helps

Gord Dibben

erasing space/blank in a cell
 
Sub TRIM_EXTRA_SPACES()
Dim Cell As Range
For Each Cell In Selection
If (Not IsEmpty(Cell)) And _
Not Application.IsNumber(Cell.Value) And _
InStr(Cell.Formula, "=") = 0 _
Then Cell.Value = Application.Trim(Cell.Value)
Next
End Sub


Gord Dibben MS Excel MVP

On Thu, 15 Jan 2009 06:17:08 -0800 (PST), thread wrote:

Hi
i'm doing alot of vlookup work and very common to facea problem in
linking becaouse of additional space or blank line
does anyone have an idea how can it be overcomed?




All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com