Remove blank space at end of number

Nivian

New Member
Joined
Jun 8, 2018
Messages
12
Good day

Please see below. I have table which has numbers which has a space at the end, when trying to autosum the value is 0 due to this space. I cannot remove it 1 by 1. Please assist.

1628581005761.png
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
@Nivian. Every chance that that your data is text. Assuming that you have just spaces and no other special characters in there then maybe along these lines.

MRXLMAY21.xlsm
CDE
1VALUESDirect SUMCONVERTED
2123437250111234
31244412444
412345551234555
512345561234556
612345571234557
7999999
866666666
920344SUM3725011
Sheet3
Cell Formulas
RangeFormula
D2D2=SUMPRODUCT(--(C2:C8))
C9,E9C9=SUM(C2:C8)
E2:E8E2=IFERROR(1*TRIM(C2),"")


The SUMPRODUCT formula should work directly on your current data.
With a General cell format, the TRIM formula should convert, applied cells, to number.

If it were me, wanting to convert the whole range I would probably use a simple vba macro.
*NB that the XL2B rendering above does not show the spaces I have in the Value column.
Hope that helps.
 
Last edited:
Upvote 0
I think you have bigger issues than that. How are you getting the data into Excel ? Where is it coming from initially and in what format ?
Your first column has a full stop as a decimal separator the others use a comma.
(Getting a mixture in the one table is really unusual)
What is your normal Excel setting full stop or comma ?

Your negative numbers have a trailing minus sign.

The best fix would be to change the process by which you are getting the data.
The next non-VBA approach would be to use Text to Columns on each column (unfortunately one column at a time)

Power Query or VBA would be able to do it too.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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