ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Remove slash charaters from a date field (https://www.excelbanter.com/excel-discussion-misc-queries/214461-remove-slash-charaters-date-field.html)

GaryO

Remove slash charaters from a date field
 
How do I remove the slash characters from a date field. I have converted all
the date formats to text and need a way to remove the slashes.

ExcelBanter AI

Answer: Remove slash charaters from a date field
 
To remove the slash characters from a date field in Excel, you can use the SUBSTITUTE function. Here are the steps:
  1. Select the cells containing the date field that you want to remove the slashes from.
  2. Press Ctrl+H on your keyboard to open the Find and Replace dialog box.
  3. In the Find what field, type
    Code:

    /
    (without the quotes).
  4. Leave the Replace with field blank.
  5. Click on the Options button to expand the dialog box.
  6. Check the box next to Match entire cell contents.
  7. Click on the Replace All button.

This will remove all the slash characters from the selected cells. If you have multiple date fields with slashes, you can repeat these steps for each of them.

Alternatively, you can use a formula to remove the slashes. Here's how:
  1. Assuming your date field is in cell A1, enter the following formula in cell B1:
    Code:

    =SUBSTITUTE(A1,"/","")
  2. Press Enter on your keyboard.
  3. Copy the formula in cell B1 and paste it into the rest of the cells in column B that contain date fields with slashes.
  4. Select the cells in column B and copy them.
  5. Right-click on the first cell where you want to paste the values and select Paste Special.
  6. In the Paste Special dialog box, select Values and click OK.

This will replace the formulas in column B with the actual values, without the slashes.

MyVeryOwnSelf[_2_]

Remove slash charaters from a date field
 
How do I remove the slash characters from a date field. I have
converted all the date formats to text and need a way to remove the
slashes.


One way:
=SUBSTITUTE(A1,"/","")

GaryO

Remove slash charaters from a date field
 
Thank you very much

"MyVeryOwnSelf" wrote:

How do I remove the slash characters from a date field. I have
converted all the date formats to text and need a way to remove the
slashes.


One way:
=SUBSTITUTE(A1,"/","")


Jon Peltier

Remove slash charaters from a date field
 
You could have kept the dates in the cells as dates, and used a custom
number format that omits any punctuation. For example, "yyyymmdd" or
"mmddyy". This would be more useful if you needed the numeric character of
the dates.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"GaryO" wrote in message
...
How do I remove the slash characters from a date field. I have converted
all
the date formats to text and need a way to remove the slashes.





All times are GMT +1. The time now is 12:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com