Macro Help

  • Thread starter Thread starter Bryan
  • Start date Start date
B

Bryan

I don't know very much about coding macros at all so I was wonder how I
would get one to change the content of a selected column's individual cells
based on that cell's content. For example, if have column A with either "e"
or "c" in each cell I want the macro to change the c's into 0's and the e's
into 1's. Is it possible to do something like that?

-- Bryan
 
Bryan

It is possible but a Macro is not needed for this. Worksheet function will do
the job.

In a "helper" column enter =IF(A1="c",0,IF(A1="e",1,"neither"))

Drag/copy down as far as you need.


Gord Dibben MS Excel MVP
 
You could also select the range and do a couple of edit|replaces.

Make sure you check the "match entire cell contents" under the options button.

And if you needed a macro, you could record one when you did it manually.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top