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: 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.

 
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
Find duplicate values in column K then compare cells range of dups jonnybrovo815 Excel Programming 0 July 25th 07 07:52 PM
How do I compare a result to a range of values? UnisourceforNPH Excel Worksheet Functions 6 June 12th 07 08:09 PM
Compare alpha and numeric values within a range Greg Excel Worksheet Functions 9 May 5th 06 05:17 AM
Compare a selected Range with a Named range and select cells that do not exist PCLIVE Excel Programming 1 October 18th 05 07:09 PM


All times are GMT +1. The time now is 02:05 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"