Edit Cell Macro

T

Tyler McLean

I need to create a macro to edit the contents of a cell and put quotes
around it.
For example: car ---> "car"
The contents of the cells will be both numbers and words.
I would need to use this format on everything in the spreadsheet in order to
import this into another program.


Thanks,
Tyler
tmclean79 at shaw dot ca
 
M

Mike Hughes

Tyler

One way.

Create a button and assign the code below.

Sub Button1_Click()
whatsthere = ActiveCell.Text
ActiveCell.Clear
ActiveCell.Value = Chr(34) + whatsthere + Chr(34)

End Sub

select a cell and click the button. Making it work on multiple cells is more
difficuly but if I understand the question yoo don't want to do that.

Mike
 

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

Top