How to get a cell value in Excel?

Posted by jpatel7 on 19-Apr-2018 17:02

I want to have a loop over spreadsheet columns and rows and perform some action for a certain cell value.

Something like:

for each cells:

   if cellValue = "abc" then do:

      //Do something

   end.

end.

I can't use range directly like this:

chWorksheet:Range("B1"):VALUE.

Because I need dynamic position of the cell.

I found some code in VB:

For Each c in Worksheets("Sheet1").Range("A1:D10") 
   If c.Value < .001 Then 
      c.Value = 0 
   End If 
Next c

Is there a similar way in Progress?

Thanks.

Posted by tpavlovic on 20-Apr-2018 00:44

Worksheets("Sheet1"):Cells(<row>, <col>):Value

All Replies

Posted by tpavlovic on 20-Apr-2018 00:44

Worksheets("Sheet1"):Cells(<row>, <col>):Value

This thread is closed