Hello , below is my function. But my code throws error at "For Each " line as shown below
Can you please help me to remove this error ?![]()
Public Function displayExpectedValues() startRowValue = InputBox("Enter FirstRow Number to read data") EndRowValue = InputBox("Enter Last Row Number to read Data") For Each c In Sheets("Reasult Reader").Range("Q17:Q70") ' SubScript out of range error , thrown at this line. c.Offset(0, 2) = c.Offset(0, 1).Value + c.Offset(0, 3).Value startRowValue = startRowValue + 1 If startRowValue = EndRowValue Then Exit For End If Next c End Function
Bookmarks