View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Count Cells in Range

Sub ProcessBidCatNum()
Dim cell as Range, cell1 as Range
for each cell in Range("BidCatNum")
if lcase(cell.value) = "y" then
set cell1 = cell.offset(0,1)
' perform action using cell1
end if
Next
End Sub

--
Regards,
Tom Ogilvy

"Steve C" wrote in message
...
I have a named range (non contiguous cells) going down several columns

called
BidCatNum. Most of these cells contain the letter "Y". For each cell

that
contains the letter "Y", I want to write code to perform an action on the
cell immediately to the right of it.

I'm not too experienced with the "For each cell in this range, do this"
lingo. Could someone get me started? Thanks!