View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
pikus pikus is offline
external usenet poster
 
Posts: 1
Default How To Iterate a range of cells?

lrow = Sheet1.UsedRange.Row + Sheet1.UsedRange.Rows.Count
col = column number you are searching
n = Destination cell Row
p = Destination Cell Column
For x = 1 To lrow
If Cells(x, col).Value = "Search String" Then
varNum = Cells(x, col).Value + Cells(x, col + 1).Value
Cells(n, p).Value = varNum
End If
Next

--
Message posted from http://www.ExcelForum.com