Cell reference to remove blank value at the end of Number/Text

dunmore83

Well-known Member
Joined
Aug 24, 2011
Messages
526
Hi,

I have a column of data where the numbers are stored as text & the last field in the data is a space.

For example in cell D15 is 00650657_ (where the _ is a space/blank value).

I need a formula to reference cell D15 so it removes the blank value at the end & just returns 00650657.

Any helpers ?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Saba Sabaratnam

Active Member
Joined
May 26, 2018
Messages
397
Office Version
  1. 365
  2. 2010
You could use TRIM(D15) if it is a space or SUBSTITUTE(D15,"_","") is a under score.

Kind regards

Saba
 

Momentman

Well-known Member
Joined
Jan 11, 2012
Messages
4,118
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
You can use
Excel Formula:
=LEFT(D15,LEN(D15)-1)
to have it as TEXT
or
Excel Formula:
=LEFT(D15,LEN(D15)-1)+0
to have it as numbers
 

Forum statistics

Threads
1,140,923
Messages
5,703,178
Members
421,280
Latest member
Jaycee01

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
Top