Weight with text. removing text changes weight to date.

xluserg

Board Regular
Joined
Jan 30, 2010
Messages
121
Office Version
  1. 365
Platform
  1. Windows
hi all

googled with no joy.

I have a weight with text when I remove the text it changes the weight to a date. But I need just the weight to stay as it is.


in a cell I have 8-10 p

I remove the space and the p by macro. could be space then any other text.

changes to 08-Oct I just need it to show 8-10

Thankyou


Graham



 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
If you format the range you are dealing with as "text" format, when you remove the " p" suffix the cell will still display "8-10." You could do this before you run the macro to delete the suffixes, or make it part of the macro (set the cell's numberformat property to "@"). Alternatively, you could change the macro to enter an apostrophe before the cell value when you are removing the " p" suffix.
 
Upvote 0
Hi Dean


could'nt get your first method to work so used your second method, that worked fine!


Thanks Dean.


Brilliant!


Graham
 
Upvote 0
Sounds like you are sorted, but here is yet another method if the text part always has a space before it.
Select the column by clicking its heading label -> Data ribbon tab -> Text to Columns -> Delimited -> Next -> Mark the Space box -> Next -> (first column at the bottom should be highlighted) Choose Text at the top -> Click in the 2nd column at the bottom & choose Do not import at the top -> Finish
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,633
Latest member
DougMo

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