I am having case like below, I need row number of particular condition.
Dim sve_rc as Integer
sve_rc = 1 ' to get Rowcount
With Worksheets("Mktg.Effort")
For lrow = 1 To .Cells(.Rows.Count, "A").End(xlUp).Row
Select Case CStr(Cells(lrow, "A").Value)
Case "engg"
' do somwthing
Case "SvE"
sve_aug = Cells(lrow, "AF").Value
sve_rc = ActiveCell.Row ' here I am getting rows from 1st colum I need only rows where case is "SvE"
sum = sum + Range("AF" & sve_rc)
Case "GMO"
' do something
End Select
Next lrow
End With
My Excel is as below,
engg
SvE
SvE
GMO
engg
GMO
So if I check for condition SvE I must get row number as 2, but I am getting it from 1. Unable to build logic here... any help please.