How can I setup an Excel Macro to loop?

E

ExcelNovice

I have recorded a Macro which will edit a cell from text to numeric. The
problem I have is that the Macro will only do one cell at a time. I am
working on a huge database and the file I am working with has an apostrophe
at the beginning and ending of the values I need to convert.

I need a quick response as I am under a tight deadline.
 
E

Elkar

There are different ways to do loops, it would be easier to make a suggestion
if we knew what your macro looked like thus far.

But, there may be an easier way to remove those apostrophes than using a
macro.

Highlight your range of data, then do a Find/Replace. Replace ' with blank.
That will eliminate the end apostrophe from all of your data.

Then, in any blank, unused cell, enter the number 1. Then copy this cell.
Highlight your range of data, then select "Paste Special". Select "Multiply"
from the Paste Special window, then click OK. All of your data will now be
multiplied by 1, which will convert it to a number, without changing the
value.

HTH,
Elkar
 
Top