Heyitslopes
New Member
- Joined
- Jun 7, 2016
- Messages
- 9
Good morning i'm having issues with a line in my code and or i'm not using it right.
Everything seems to be working except the bolded line of code. It brings in the correct data from the other sheets and it sums them but it just copies the data in row 3, column 6 all the way till end of my Do until and not each matching cell.
I'm essentially trying to do a Do until last row in Column 4 if it and if it is true pull the matching cell data onto the sheet
Dim row As Integer
row = 3
Do Until activesheet.Cells(row, 4).Value = ""
activesheet.Cells(row, 6).Formula = activesheet.Cells(row, 4).Value * activesheet.Cells(row, 5).Value
activesheet.Cells(row, 7).Formula = "=SUM('Instructions:End'!E4)"
activesheet.Cells(row, 8).Formula = activesheet.Cells(row, 4).Value * activesheet.Cells(row, 7).Value
activesheet.Cells(row, 9).Formula = activesheet.Cells(row, 8).Value / activesheet.Cells(row, 6).Value
row = row + 1
Loop
Any Ideas?
Everything seems to be working except the bolded line of code. It brings in the correct data from the other sheets and it sums them but it just copies the data in row 3, column 6 all the way till end of my Do until and not each matching cell.
I'm essentially trying to do a Do until last row in Column 4 if it and if it is true pull the matching cell data onto the sheet
Dim row As Integer
row = 3
Do Until activesheet.Cells(row, 4).Value = ""
activesheet.Cells(row, 6).Formula = activesheet.Cells(row, 4).Value * activesheet.Cells(row, 5).Value
activesheet.Cells(row, 7).Formula = "=SUM('Instructions:End'!E4)"
activesheet.Cells(row, 8).Formula = activesheet.Cells(row, 4).Value * activesheet.Cells(row, 7).Value
activesheet.Cells(row, 9).Formula = activesheet.Cells(row, 8).Value / activesheet.Cells(row, 6).Value
row = row + 1
Loop
Any Ideas?