VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
How can i replace the bold part?
Function test1234()
Dim a As Long
If ActiveSheet.Name = "Sheet1" Then
Else
End If
a = Application.Caller.Row + 1
Do While Cells(a, 1).Value <> "Yes"
If Cells(a, 2) = "Yes" Then Exit Do
test1234 = test1234 + Val(Cells(a, 2).Value)
a = a + 1
Loop
End Function
Function test1234()
Dim a As Long
If ActiveSheet.Name = "Sheet1" Then
Else
End If
a = Application.Caller.Row + 1
Do While Cells(a, 1).Value <> "Yes"
If Cells(a, 2) = "Yes" Then Exit Do
test1234 = test1234 + Val(Cells(a, 2).Value)
a = a + 1
Loop
End Function