Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2018, 08:05 AM
goingvirtual goingvirtual is offline Changing text to number format Windows 10 Changing text to number format Office 2016
Novice
Changing text to number format
 
Join Date: Apr 2018
Posts: 9
goingvirtual is on a distinguished road
Default Changing text to number format


I copied data from a table into Excel, and when I tried to multiply two numbers together, it results in "#VALUE!". I thought that probably means that the numbers are formatted as text, so I've tried:
  1. Removing commas using find and replace
  2. Using the "Trim" function to remove spaces
  3. Using the "Value" function to change from text to numerical formatting

However, I'm still getting the same #VALUE! result when I try to perform mathematical operations using this data. Any suggestions?

Thanks,
Mike
Reply With Quote
  #2  
Old 04-18-2018, 08:51 AM
xor xor is offline Changing text to number format Windows 10 Changing text to number format Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

You might want to try (both numbers):

=TRIM(SUBSTITUTE(<cell>, CHAR(160),""))*1
Reply With Quote
  #3  
Old 04-18-2018, 09:04 AM
ArviLaanemets ArviLaanemets is offline Changing text to number format Windows 8 Changing text to number format Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

1. At start, select whole range where numeric values must be, and format the range as General or Number. NB! Setting the format doesn't convert any entries to numbers when they were text before, but it is a condition needed for all next steps to be successful;

2. When the numbers must have decimals, check, what is decimal delimiter in your Window settings, and compare this with your data (you can check this easily in some empty cell - enter the formula =1/2, and look at result. Is it 0.5 or 0,5. When all your data have decimal values and delimiter is different, a simple REPLACE operation over range with values to convert will do. When there are also integer values, then those cells remain text (but when you have wrong delimiter in datarange, then replacig it is MUST anyway;

3. Select some non-converted entry and look at it in formula field at top of sheet. When the entry is preceded with apostrophe (like '123), another REPLACE is needed (' with nothing). And I'm not entirely sure, but leading/trailing spaces or especially spaces entered between thousands groups may be also culprit - in this case REPALCE is also easiest to use;

4. And as last step (or second, when there was no need for steps 2 and 3), enter e.g. number 1 or 0 into some free cell, copy the cell (Ctrl+C), select the datarange, use PasteSpecial from right-click menu, and select then Multiply or Add (depending on the value you copied).
Or select a cell, press F2, and then press Enter - for every cell in datarange.
Reply With Quote
  #4  
Old 04-18-2018, 09:04 AM
goingvirtual goingvirtual is offline Changing text to number format Windows 10 Changing text to number format Office 2016
Novice
Changing text to number format
 
Join Date: Apr 2018
Posts: 9
goingvirtual is on a distinguished road
Default

That works. Thanks!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing text to number format Number Format Changing in DocVariable method afshin Word VBA 3 08-06-2017 03:21 PM
Number Format Changing in DocVariable method afshin Word 0 08-02-2017 12:26 AM
Changing text to number format Changing caption number format dpashley Word 1 05-02-2017 03:53 PM
Changing text to number format How to format a TOC (level 1) using a number, but have the number hidden in the text porpoiseoil Word 1 09-13-2014 12:53 PM
Changing text to number format Cannot Convert Text Cell to number format to be able to sort the data jyfuller Excel 10 06-19-2013 05:31 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft