My data has two columns.
Column C (Alphabets - A, B, C ...)
Column D (Value - 1, 2, 3 ...).
Each alphabet has its corresponding value.
I am trying to locate two cells (e.g. "G" to "J") from column C to set the range, then use this range to sum the corresponding values in column D (i.e. 7 + 8 +9 + 10 = 34).
I tried VLOOKUP and MATCH. The MATCH code returned Error 2015.
Sub loop1()
'Dynamic range for cells with data
Dim LastRow As Long
LastRow = Worksheets("HU").Cells(Rows.Count, 2).End(xlUp).Row '
LastRow1 = LastRow - 1
Rng = "C1:D" & LastRow1
matchrng = "C1:C" & LastRow1
'Locate start cell in data
alphabet_start = "G"
locate_start = Application.Match(alphabet_start, matchrng, 0)
'Determine end cell
alphabet_end = "J"
'WIP_end = Application.VLookup(alphabet_end, myrange, 2, False)
End Sub

=IFERROR(SUM(INDIRECT("D" & MATCH("G",C:C,0) & ":D" & MATCH("J",C:C,0))),"Not Found")- Siddharth Rout