Remove dots from text?

TME1991

New Member
Joined
Aug 26, 2011
Messages
4
Hello there,

First, I'd like to say that I am not a modder or anything, I am actually a Political Science student. I came across this forum while I was searching for a solution to my problem.

Anyway, on a site I'm registered to, there are random codes posted sometimes that you can win stuff from. You have to copy the code and insert it in a text box but remove the dots (.) from the codes. Of course that takes a while to do and I never win lol.

Is there a way to do that on Microsoft Office or Microsoft Excel? What I mean is, can I, for instance, copy the code from the browser, paste it to Office/Excel and it would automatically remove the dots, and then I'd copy and paste it in the browser? That process shouldn't take more than 1 or 2 seconds if done correctly.

I have heard about Macros, but I am not unable to use them. This is the code that supposedly does that:

Code:
f = open( "test.txt", "r" )
text = f.read()
f.close()

newText = ""
for each in text:
    if each == ".":
        each = "" #Or replace it with whatever you like.
    newText += each

f = open( "output.txt", "w" )
f.write( newText )
f.close()

But I neither understand it nor know how to use it.

Thank you, guys.

EDIT: This is the type of codes I'm taling about - .US1337-Z.37HQLW.279N92Q8R1TH3QQLPT
 
Last edited:

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
If you have excel, paste your code into A1 and enter the following formula in B1

=substitute(A1,".","")

HTH
 
Upvote 0
Thank you so, so much, guys. That worked like a charm!

I never knew Excel can do stuff like that, I always just guessed. Guess I have a lot of learning to do!
 
Upvote 0
I see. Probably wouldn't have helped you much if you had got it working, since you'd need to save all your codes to a text file, close it, run the code and then reopen the text file to get your results.
 
Upvote 0

Forum statistics

Threads
1,224,565
Messages
6,179,549
Members
452,927
Latest member
rows and columns

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top