Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-23-2019, 10:49 AM
shovan shovan is offline sum Windows 7 32bit sum Office 2010
Novice
sum
 
Join Date: Nov 2019
Posts: 1
shovan is on a distinguished road
Default sum

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
Reply With Quote
  #2  
Old 11-24-2019, 06:37 AM
p45cal's Avatar
p45cal p45cal is online now sum Windows 10 sum Office 2019
Expert
 
Join Date: Apr 2014
Posts: 863
p45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant futurep45cal has a brilliant future
Default

Supply a workbook with the above sheets and data and a few examples of the results you expect to see in column G of the Sus_AC sheet.
Reply With Quote
Reply

Tags
sum

Thread Tools
Display Modes


Other Forums: Access Forums

All times are GMT -7. The time now is 09:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft