Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Could someone help me with this problem! My Excel sheet has a Macro which has a procedure to remove spaces from the cell value and insert in to another Sheet. Eg:My code is as simple as follows: b = Sheets("ABC").Range("A5").value Sheets("XYZ").Range("A1").value = Trim(b) This Trim function removes forward and back spaces in some Cells, but just ignores spaces in some Cells, and as a result in the output i get some Cells with the Spaces in the values. I wonder if Excel has a variety of Spaces which are different from each other, Because my Macro handles certain spaces and ignores others??? I Appreciate any help. Thanks, Neeraja. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you're trying to remove spaces between words, and on both ends.
Application.WoksheetFunction.Trim -------------------------------------------------------------------------------------------------------------- I believe that space is Char 32. http://www.rpi.edu/~kirkd/ascii/ -------------------------------------------------------------------------------------------------------------- Chip Person's CellView add-in allows you to see the exact characters in a cell, as well as their character codes (in either decimal or hex numbers). http://www.cpearson.com/excel/cellview.htm -------------------------------------------------------------------------------------------------------------- David McRitchie's Trimall macro helps to remove 'spaces' that aren't really spaces. http://www.mvps.org/dmcritchie/excel/join.htm#trimall HTH Paul -------------------------------------------------------------------------------------------------------------- Be advised to back up your WorkBook before attempting to make changes. -------------------------------------------------------------------------------------------------------------- Hi, Could someone help me with this problem! My Excel sheet has a Macro which has a procedure to remove spaces from the cell value and insert in to another Sheet. Eg:My code is as simple as follows: b = Sheets("ABC").Range("A5").value Sheets("XYZ").Range("A1").value = Trim(b) This Trim function removes forward and back spaces in some Cells, but just ignores spaces in some Cells, and as a result in the output i get some Cells with the Spaces in the values. I wonder if Excel has a variety of Spaces which are different from each other, Because my Macro handles certain spaces and ignores others??? I Appreciate any help. Thanks, Neeraja. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trim function to remove blank spaces in Excel | Excel Discussion (Misc queries) | |||
TRIM function | Excel Worksheet Functions | |||
TRIM function | New Users to Excel | |||
Need help with TRIM function | Excel Worksheet Functions | |||
using trim cmd. When I type this command it does not work. When I. | Excel Worksheet Functions |