How to use excels textafter if delimiter is a slash or backslash

Bennie Larrier 0 Reputation points
2023-07-19T20:48:39.3366667+00:00

Excell

sample 1

Cell A1 = 3/4/72

cell A2 = textafter(A1,"/")

fails w "N/A"

example 2

Cell A1 = 3@4@72

cell A2 = textafter(A1,"@")

works fine

How do I enable textafter to search for "/"

Microsoft 365 and Office | Excel | For business | Windows
{count} votes

2 answers

Sort by: Most helpful
  1. Barry Schwarz 3,746 Reputation points
    2023-07-20T06:31:21.5866667+00:00

    @Bennie Larrier ,

    In you first example, the value of the cell is 26362. It is only displayed as a date because of formatting. Try setting A2 to = textafter(text(A1,"mm/dd/yyyy"),"/")

    0 comments No comments

  2. AllenXu-MSFT 24,951 Reputation points Moderator
    2023-07-20T07:17:35.43+00:00

    Hi @Bennie Larrier,

    In this case, slash or backslash cannot be recognized by Textafter() function. This is by default. I would suggest you find and replace all slashes or backslashes to other characters which can be recognized by Textafter like "@".


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.