VBE313
Well-known Member
- Joined
- Mar 22, 2019
- Messages
- 686
- Office Version
- 365
- Platform
- Windows
How can I refer to a range rather than entire column?
Thanks
Function Level5MakeMaterialCost()
Dim R As Long
Application.Volatile (True)
R = Application.Caller.Row + 1
Do While Cells(R, "BN").Value <> "Yes"
If Cells(R, "BM") = "" Then Exit Do
Level5MakeMaterialCost = Level5MakeMaterialCost + Val(Cells(R, "BM").Value)
R = R + 1
Loop
End Function
Thanks
Function Level5MakeMaterialCost()
Dim R As Long
Application.Volatile (True)
R = Application.Caller.Row + 1
Do While Cells(R, "BN").Value <> "Yes"
If Cells(R, "BM") = "" Then Exit Do
Level5MakeMaterialCost = Level5MakeMaterialCost + Val(Cells(R, "BM").Value)
R = R + 1
Loop
End Function