Removing spaces from cell with numbers

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
113
Tried formatting the column to Text, Numbers, General, Currency but cannot seem to remove the spaces
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif][FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]https://ibb.co/kQXF4GV[/FONT]
Both columns are aligned to the left and have spaces in front of them.
[/FONT]
Worksheet Formulas
CellFormula
J2=TRIM(I2)
J3=CLEAN(I3)
J4=SUBSTITUTE(I4," ","")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Any idea how to do it?
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,789
post a link to the shared excel file with representative example not a picture
 

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
113
=SUBSTITUTE(I4,char(160),"")
Thank you Fluff, it worked :)
When I used the formula, it created one space on either side of the number.
I then did a search and replaced the spaces with nothing.

FWIW FYI the spreadsheet in question
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]https://1drv.ms/x/s!AvjBsEPEq12ngSXcAbrkSBtIo_dl?e=K9Qphn[/FONT]
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,206
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback.
However that formula does not add any spaces.
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
3,789
or

Invoice Amount (Net Price) Invoice Amount (Net Price)
176.80
176.8​
137.60
137.6​
406.59
406.59​
175.22
175.22​
300.00
300​
265.75
265.75​
94.75
94.75​
235.00
235​
658.27
658.27​
245.25
245.25​
908.06
908.06​
673.99
673.99​
749.45
749.45​
204.80
204.8​
523.78
523.78​
751.09
751.09​
334.22
334.22​
267.19
267.19​
487.03
487.03​

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    Type = Table.TransformColumnTypes(Source,{{"Invoice Amount (Net Price) ", type number}})
in
    Type[/SIZE]
 

Forum statistics

Threads
1,081,996
Messages
5,362,612
Members
400,684
Latest member
Vie

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top