Hi I have code in VBA i want to convert it to VB.NET
the code
Code:
- Dim lastrow AsInteger
- Dim curRow AsInteger
- Dim newrow AsInteger
- lastrow = exWS2.Cells.Rows.End(XlDirection.xlDown).Row
- exWS2.Cells(8,6).Value ="Max"
- exWS2.Cells(8,7).Value ="=Max(B2:B"& lastrow &")"
- newrow =8
- For curRow =2To lastrow
- If exWS2.Cells(curRow,2)= exWS2.Cells(8,7).Value Then
- newrow = newrow +1
- exWS2.Cells(newrow,6).Value = exWS2.Cells(curRow,1).Value
- EndIf
- Next curRow
help me