View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

Oops....if Nr is really a named cell, use this intead.

Range("Nr").value _
= range("Nr").value + cells(activecell.row,activecell.column+2).value

or

range("Nr").value _
= range("Nr").value + activecell.offset(0,2).value



Dave Peterson wrote:

Nr is a range name?

cells("Nr").value _
= cells("Nr").value + cells(activecell.row,activecell.column+2).value

or

cells("Nr").value _
= cells("Nr").value + activecell.offset(0,2).value

kizzie wrote:

thx

Cells(Nr).Value = Cells(Nr).Value + Cells(ActiveCell.Rows,
ActiveCell.Columns + 2).Value

Whats wrong with this code? I want to add the value the cell 2 columns
right of the active cell, to the cell named "Nr"

thx

--
kizzie
------------------------------------------------------------------------
kizzie's Profile: http://www.excelforum.com/member.php...o&userid=26092
View this thread: http://www.excelforum.com/showthread...hreadid=394203


--

Dave Peterson


--

Dave Peterson