View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Cell Range Values with VBA


For Each cell In Selection
Select Case cell.Value
Case "abc": cntr1 = cntr1 + 1
Case "xyz": cntr2 = cntr2+1
Case Else: MsgBox "oops"
End Select
Next cell

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"drdexter33" wrote
in message ...

I really haven't used VBA in Excel before, but what I'm trying to do is
loop through a range of cells and determine the string value and
increment 2 counters depending on the value of the strings and then
display the value in a cell in the EXCEL spreadsheet.

I have NO idea on how to do this except that I probably need to use
VBA.

I am a .Net/C# programmer so that wil give you an idea of my
background..

Thanks for your help!

Doug


--
drdexter33
------------------------------------------------------------------------
drdexter33's Profile:

http://www.excelforum.com/member.php...o&userid=36203
View this thread: http://www.excelforum.com/showthread...hreadid=559903