ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add (https://www.excelbanter.com/excel-programming/427694-add.html)

LuisE

Add
 
I need to loop thru a range of cells and evaluate

Jacob Skaria

Add
 
Please adjust the range...and set your evaluation code. If you are new to VBE
launch VBE using Alt+F11. Insert Module. and paste the below code....Use Step
Into (function key F8) and see what happens...

Sub LoopthroughRange()
Set rngTemp = Sheets("Sheet1").Range("A1:A10")
For Each rngCell In rngTemp
If rngCell.Text = "<condition" Then
'your code to evaluate
End If
Next
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"LuisE" wrote:

I need to loop thru a range of cells and evaluate



All times are GMT +1. The time now is 12:55 AM.

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