LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding numbers that contain ranges Fyrfytr Excel Worksheet Functions 3 September 21st 06 08:52 AM
Adding Non-Contiguous Ranges COE Excel Discussion (Misc queries) 11 January 24th 06 11:43 PM
adding ranges [email protected] Excel Discussion (Misc queries) 2 November 21st 05 04:22 PM
adding named ranges Mike EHB-Docks New Users to Excel 7 April 8th 05 01:53 PM
Adding ranges Bryan via OfficeKB.com Excel Programming 3 February 25th 05 03:06 AM


All times are GMT +1. The time now is 05:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"