Find Or Replace Chr160 In Excel For Mac
Sep 07, 2016 I confirm your experience - I don't see a way, on my Mac, of limiting find and replace to a selection. Perhaps on Windows that's an elementary part of the standard find-and-relplace support for text files, in a way that it is not on macOS. I note for example that the find-and-replace dialog in TextEdit is remarkably similar to that in Stata.
Some Excel values look like numbers, but don't add up, because Excel thinks they are text. With the techniques in the article, you can convert text 'numbers' to real numbers.
NOTE: For instructions on changing written words to numbers (e.g. from Three to 3), see Words to Numbers in Excel.
Look Like Numbers, But Don't Add Up
If you copy data from another program, or from a text file or a web site, Excel may treat the numbers as text. In Excel, the values could look like numbers, but they don't act like numbers, and don't show a correct total, as you can see below.
In the screen shot above, the values in column C look like numbers, but they don't add up -- the total is zero.
At the right, the COUNTA function is used in cell F4, and it shows that there are 4 entries in that range of cells.
However, the COUNT function in cell F5 show a result of zero -- none of the values in cells C3:C6 are recognized as numers.
Symphytum mac app. Symphytum is an easy-to-use personal database software with cloud synchronization support. Design input forms. Move and resize fields thanks to the dynamic layout engine. Symphytum manages synchronization conflicts for you. While only one session with write access is allowed at the same time, other computers may access the database in read-only mode during an open session.
Convert Text to Numbers with Paste Special
For some 'text' numbers, you can fix the problem with Paste Special. Watch this short video tutorial, to see the steps, and the written instructions are below. If you need to do this frequently, you can use a macro to automate the task.
NOTE: The 'Convert Text to Numbers' feature is available in my Contextures Excel Tools add-in
To fix numbers that are seen as text, follow these steps:
- Right-click a blank cell, and click Copy
- Select the cells that contain the 'text' numbers
- Right-click on one of the selected cells, and click Paste Special
- In the Paste section, select Values
- In the Operation section, select Add
- Click OK
After the numbers have been fixed, you can apply formatting, by using the Number Format commands on the Ribbon's Home tab.
Convert Text to Numbers With VBA
If you frequently convert text to numbers, you can use a macro.
Store the following macro in a workbook that is always open, such as your Personal Workbook. Then, add a button to an existing toolbar, and attach the macro to that button. To fix 'text' numbers, select the cells, and click the toolbar button.
Convert Dates with Replace All
If dates are formatted with slashes, such as 4/5/14, you can try to convert them to real dates by replacing the slashes.
- Select the cells that contain the dates
- On the Ribbon's Home tab, click Find & Select (at the far right)
- Click Replace
- For Find what, type a forward slash: /
- For Replace with, type a forward slash: /
- Click Replace All
- Click OK to confirm the replacement, then close the Find and Replace window .
After the dates have been fixed, you can apply formatting, by using the Number Format commands on the Ribbon's Home tab.
Fix Hidden Characters
If you copy data from a website, it might include hidden characters, such a non-breaking space. In Excel, this is character 160, and it is not fixed by some of the number cleanup techniques. You can search for that character, and replace it.
If you need to do this frequently, you can use a macro to automate the task.
- Select the cells that contain the numbers to be fixed
- On the Ribbon's Home tab, click Find & Replace (at the far right)
- Click Replace
- For Find what, press the Alt key, and on the number keypad, press 0160 (nothing will appear in the box)
- For Replace with, leave the box empty
- Click Replace All
- Click OK to confirm the replacement, then close the Find and Replace window .
Fix Hidden Characters With VBA
If you frequently need to remove the hidden non-breaking space character, you can use a macro.
Store the following macro in a workbook that is always open, such as your Personal Workbook. Then, add a button to an existing toolbar, and attach the macro to that button. To fix 'text' numbers, select the cells, and click the toolbar button.
Convert Text to Numbers with Text to Columns
- Select the cells that contain the numbers
- On the Ribbon's Data tab, click Text to Columns
- In Step 1, select Delimited as the File type, then click the Finish button
Convert Currency With Different Separators
If a worksheet has currency in a format with different separators, use the Text To Columns command to convert the values. For example, change German currency -- 987.654,32 -- to US currency -- 987,654.32
- The German currency uses a period as the Thousands separator, and a comma as the Decimal separator
- The US currency uses a comma as the Thousands separator, and a period as the Decimal separator
- Select the cells that contain the numbers
- Choose Data>Text to Columns
- In the Text to Columns window, click Next, twice
- In Step 3, click the Advanced button
- From the Decimal separator drop down, select the separator that is currently used in the values -- ',' (comma) in this example
- From the Thousands separator drop down, select the separator that is currently used in the values -- '.' (period) in this example
- Click OK, then click Finish.
Convert Trailing Minus Signs
If you import numbers that have a trailing minus sign, you can use one of the following techniques to convert them to negative numbers.
Text to Columns
With the Text to Columns feature, imported numbers with trailing minus signs can be easily converted to negative numbers.
- Select the cells that contain the numbers
- Choose Data>Text to Columns
- To view the Trailing Minus setting, click Next, click Next
- In Step 3, click the Advanced button
- Check the box for 'Trailing minus for negative numbers', click OK
- Click Finish
Note: If 'Trailing minus for negative numbers' is checked, you can click Finish in Step 1 of the Text to Columns wizard.
Convert Trailing Minus Signs - Formula
Thanks to Bob Ryan, from Simply Learning Excel, who sent this formula to fix imported numbers with trailing minus signs.
- In this example, the first number with a trailing minus sign is in cell A1
- Select cell B1, and enter this formula:
- =IF(RIGHT(A1,1)='-',-VALUE(LEFT(A1,LEN(A1)-1)),VALUE(A1))
- Copy the formula down to the last row of data.
In the formula, the RIGHT function returns the last character in cell A1.
If that character is a minus sign, the VALUE function returns the number value to the left of the trailing minus sign.
The minus sign before the VALUE function changes the value to a negative amount.
Convert Trailing Minus Signs Programmatically
In all versions of Excel, you can use the following macro to convert numbers with trailing minus signs.
Paste as CSV
When importing data, you might be able to prevent copied numbers from being pasted as text, if you paste the data as CSV.
- Copy the data in the other program
- Switch to Excel
- Right-click the cell where the paste will start, and click Paste Special
- Choose Edit>Paste Special
- Select CSV, if it appears in the list, and click OK
Download the Sample File
Download the zipped file with the sample data and macros. The zipped file is in xlsm format, and contains macros, so enable them to test the code.
More Data Entry Tutorials
____________
Don't Miss Our Excel Tips
Don't miss my latest Excel tips and videos! Click OK, to get my weekly newsletter with Excel tips, and links to other Excel news and resources.