View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Angela Angela is offline
external usenet poster
 
Posts: 85
Default How do you cut a paste a macro or VB language in Excel and mak

Well - maybe I should start over. that does answer my question. Thank you,
however, my problem is not solved. Here's the situation. I imported all of
my contacts from Outlook. In the address section, there are hard returns. I
need to eliminate the hard returns and move the data beyond the HRT in to the
cell to the right. For example: "123||Anywhere Street||Suite 400||City
State". I would like to eliminate the HRT and move suite 400 in to the cell
to the right.

Thanks so much for your help and patience.

"Rowan Drummond" wrote:

Angela

In Excel hit Alt+F11. That will open the Visual Basic Editor (VBE). In
the VBE from the menus select InsertModule. That will create a new
module and your cursor will be near the top of the module. Paste you VBA
code right there. Then hit Alt+Q to return to Excel. In Excel from the
Menus select ToolsMacroMacros (or Alt+F8) to open a list of macros -
I'm guessing there will be just the one. Click on the macro and select Run.

Hope this helps
Rowan

Angela wrote:
Thanks - but actually, the code was to remove hard returns in cells. I do
not know how to run the code in VB.

"Steve" wrote:


Sub Macro1()

'recorded with Macro recorder
Range("A1:A2").Select
Selection.Cut
Range("B1").Select
ActiveSheet.Paste
End Sub

Sub CutMethod()

' looking up 'Cut Method' in help and modifying Example
Worksheets("Sheet1").Range("A1:A2").Cut Range("B1:B2")

End Sub

"Angela" wrote in message
...

I have some code that soemone sent me to cut and paste as a macro to
performa
function. I do not know how to do that. I can get to the VB window, but
I
don't knwo what do do from there.

Help!