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: 49
Default Function returns #Name?

I am using a SumColor function and is returning the #Name? error. Haven't
used many functions so don't quite understand what the issue is.

code is below along with =SumColor (A10, D1D60)

Function SumColor(rColor As Range, rSumRange As Range)

Dim rCell As Range
Dim iCol As Integer
Dim vResult
iCol = rColor.Interior.ColorIndex

For Each rCell In rSumRange
If rCell.Interior.ColorIndex = iCol Then
vResult = WorksheetFunction.SUM(rCell) + vResult
End If
Next rCell

SumColor = vResult
End Function

Thanks again for any help.
 
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
IF function returns function statement rather than result ckrogers Excel Worksheet Functions 3 April 16th 09 09:21 PM
INT Function Returns 1 bhavesh Excel Worksheet Functions 3 December 29th 06 02:48 PM
VBA function returns #NAME? mogens Excel Programming 4 March 20th 06 05:00 PM
Function returns a zero value Dick Kusleika Excel Programming 0 July 29th 03 05:01 PM


All times are GMT +1. The time now is 08:20 AM.

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"