View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Monique Monique is offline
external usenet poster
 
Posts: 60
Default adding two ranges

Below is a function that I am creating that will add the cells in each range
with each other. It does not work. Can anyone tell me what it is I'm doing
wrong?

Thanks in advance

Public Function AddCells(RngOne As Range, RngTwo As Range)

Dim fCell As Range
Dim sCell As Range

For Each fCell In RngOne

For Each sCell In RngTwo
sCell.Value = sCell
Next sCell

fCell.Value = fCell + sCell

Next fCell

End Function