Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sum

Status
Not open for further replies.

shovan

Programmer
Nov 23, 2019
1
BD
I have some fixed data in Sus_AC and the same continuous data in FR_Data. If two data match then sum another data how. Please help. My trying is given bellow. I am new in vba. Please help me.

Dim i As Long, a As Double
a = 0
For i = 3 To lastRow
If Worksheets("Sus_AC").Cells(i, 3).Value = Worksheets("FR_Data").Cells(i, 4).Value Then
a = a + Worksheets("FR_Data").Cells(i, 23).Value
Worksheets("Sus_AC").Select
Worksheets("Sus_AC").Cells(i, 7).Value = a
End If
Next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top