Addressing cell contents when writing Macros

  • Thread starter Thread starter Rob947
  • Start date Start date
R

Rob947

I am trying to write a macro to add "=+" to the contents of a cell.

Cell A1 contains AD11 and I need it to say =+AD11
Cell A2 contains BC34 and I need it to say =+BC34
(I have a couple of 1000 cells to add this to.)

When I write the macro and run it, the first cell is OK but cell A2
becomes =+AD12 and A3 becomes =+AD13 What am I doing wrong??
 
What am I doing wrong??

Hard to tell without your posting your macro...

First, you don't need "=+". That's a holdover from 1-2-3 notation. Just
use "=".

One thing you might try:

Dim rCell As Range
For Each rCell In Range("A1:A" & _
Range("A" & Rows.Count).End(xlUp).Row)
With rCell
.Formula = "=" & .Text
End With
Next rCell
 
Back
Top