Hi,
Can someone please help me. I can not figure out the issue with my code. Here is what I have so far:
If ActiveSheet.Cells(7, 2).Value = [" & DEFName & "]Sheet1!R15C30:R11730C30" Then
'If [" & DEFName & "]Sheet1!.Range("AC").Value = ActiveSheet.Cells(7, 2).Value Then
Do
Dim theRow As Integer
For theRow = 31 To 70
Range("AJ" & theRow).Select
ActiveCell.FormulaR1C1 = _
"=SUMIF([" & DEFName & "]Sheet1!R1C9:R2000C9,""" & Cells(theRow, 1) & """,[" & DEFName & "]Sheet1!R1C28:R2000C28)"
Range("AK" & theRow).Select
ActiveCell.FormulaR1C1 = _
"=SUMIF([" & DEFName & "]Sheet1!R1C9:R2000C9,""" & Cells(theRow, 1) & """,[" & DEFName & "]Sheet1!R1C38:R2000C38)"
Next theRow
Loop While Range(AC).Value = "One: 1155" & Range("D").Value = "Project:"
It keeps flagging my If statement(first line of code). Also, I have tried my If statement two different ways(one is commented out. I know the middle portion works, but I can not get the first line of code in the if statement right. Does anyone see anything wrong with the if statement(first line or second commented out line)???? Thanks in advance for your assistance with my code. - SEOT
PS Thanks Mudraker for helping me with code wrap for easy reading. I forgot about that.
Bookmarks