• 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.

How to get UNICHAR to act as a function and not as text.

Eloise T

Active Member
I’m trying to use a VBA macro to change any occurrence of:

"2*trips*Site*"

TO:

"2 Trips - 1st trip-Site"

BY USING:

.Replace "2*trips*Site*", "2 Trips - 1" & "=UNICHAR(115)" & "(UNICHAR(116))" & "trip-Site", xlWhole

( The UNICHARs above are Superscript s and t )

(Obviously the code line is treating anything between the double quotes as text, and I need it to read UNICHAR as a function.)

Instead of getting:

"2 Trips - 1st trip-Site"

I’m getting:

"2 Trips - 1=Unichar(115)(Unichar(116))trip-Site"

(See attached MS Word for actual visualization of Superscripts.)

Thank you in advance!
 

Attachments

  • How to get VBA code to treat UNICHAR as a function and not as text.docx
    13.3 KB · Views: 2
Last edited:
Back
Top