ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Range Values with VBA (https://www.excelbanter.com/excel-programming/366754-cell-range-values-vba.html)

drdexter33

Cell Range Values with VBA
 

I really haven't used VBA in Excel before, but what I'm trying to do i
loop through a range of cells and determine the string value an
increment 2 counters depending on the value of the strings and the
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 us
VBA.

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

Thanks for your help!

Dou

--
drdexter3
-----------------------------------------------------------------------
drdexter33's Profile: http://www.excelforum.com/member.php...fo&userid=3620
View this thread: http://www.excelforum.com/showthread.php?threadid=55990


Bob Phillips

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





All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com