edit the cell contents command in Excel 2007 macro

  • Thread starter Thread starter Safia
  • Start date Start date
S

Safia

In Excel 2007, I want to write a macor which edits the cell contnets and goes
to right or left adjacent cell and again eidts the cell contents.
Will higly appreciate the suggestion and or s,advice.
Thanks.
 
Sub test()
With ActiveSheet.Range("B1")
.Value = "middle"
.Offset(0, -1).Value = "left"
.Offset(0, 1).Value = "right"
End With
End Sub


Gord Dibben MS Excel MVP
 

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