Excel formula
Closed
Swim176
-
Nov 10, 2015 at 05:35 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Nov 10, 2015 at 11:20 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Contributor Last seen December 27, 2022 - Nov 10, 2015 at 11:20 AM
Related:
- Excel formula
- Number to words in excel formula - Guide
- Date formula in excel dd/mm/yyyy - Guide
- Excel color formula - Guide
- Formula to calculate vat in excel - Guide
- Excel mod apk for pc - Download - Spreadsheets
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Contributor
Last seen
December 27, 2022
555
Nov 10, 2015 at 11:20 AM
Nov 10, 2015 at 11:20 AM
Hi Swim,
Give the following code a try:
Best regards,
Trowa
Give the following code a try:
Sub RunMe()
Dim mValue As Long
Dim sValue As String
sValue = InputBox("Please input your search value:")
Set c = Cells.Find("DS")
If Not c Is Nothing Then
firstAddress = c.Address
Do
mValue = mValue + c.Offset(0, 1)
Set c = Cells.FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
MsgBox "All cells added up to the right of " & "'" & sValue & "'" & " results in: " & mValue
End Sub
Best regards,
Trowa