View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dale Fye Dale Fye is offline
external usenet poster
 
Posts: 169
Default Compare values of cells in a range

I want to compare the values of cells in a range, without actually selecting
the range. If so, what is the proper syntax? BTW, the sheet that the range
is on is hidden.

Private Function fnCompCells(rng as Range) as String

For each cell in rng
Dim myValue as string
If cell.value .....
'insert some comparison code here
endif
Next
fnCompCells = myValue
End
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.