• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

number issue

ahhhmed

Member
suppose I have a two digit number, eg 86 in A2, How can I insert a symbol between the two digits in B2 . the number will be as follows: 8/6
 
You can do a Search Replace or Ctrl H

Search for 8

Replace with '8/


If you don't include the ' Excel will interpret 8/6 as a date
 
Hi ahhhmed,


Assuming that your numbers don't always start with "8", you could use this macro.

(the macro will add a "/" before the last character)

[pre]
Code:
Dim rg As Range
Dim c As Range

Set rg = [A1:A5]  'range containing your values
For Each c In rg
c = "'" & Left(c, 1) & "/" & Right(c, 1)     'for 2 digits numbers
' or
' c = "'" & Left(c, Len(c) - 1) & "/" & Right(c, 1)   ' for x digits numbers
Next c
[/pre]
 
Back
Top