setting cell equal to another cell's value

C

cporter

The coding below does not set the value of
Worksheets("import").Cells(j, 4) equal to the contents of the cell
Worksheets("data").Cells(j, k). What do I need to change to get it to
do so?

If Worksheets("import").Cells(i, 4) = Worksheets("data").Cells(j, 1)
Then
Worksheets("data").Cells(j, k) = Worksheets("import").Cells(j, 4)
 
D

Dave Peterson

Are you sure that your values in i, j, k are what you expect?

And what happens when it runs? If xl yells about subscript out of range, maybe
your activeworkbook isn't the one you want it to be.
 
Top