I need help troubleshooting code that I thought would work, but I am getting an error message under the formula stating "identifier under cursor is not recognized."
I have a spreadsheet that has 2 sheets (CMPLX-DOWN and CMPLX-DOWN Pivot)
I am trying to have a sumifs formula in "CMPLX-DOWN Pivot" Range("K10:K and lastrow) that looks at the following...
1) Sum the total number of cases in Sheets("CMPLX-DOWN).Range("AM8:AM" and lastrow) where the quantity in column "DR8:DR" and lastrow is greater than or equal to 3.00, where the value in ("CMPLX-DOWN Pivot").Range("G10:G" and lastrow) matches the value in Sheets(CMPLX-DOWN).Range("A8:A" and lastrow).
I have the following code listed below.
Sub Macro90()
Dim eLastRow As Long
Set ws = ThisWorkbook.Sheets("CMPLX-DOWN")
Set ws1 = ThisWorkbook.Sheets("CMPLX-DOWN Pivot")
eLastRow = ws.Cells(Cells.Rows.Count, "A").End(xlUp).row
gLastRow = wsa.Cells(Cells.Rows.Count, "G").End(xlUp).row
Set rng1 = ws.Range("AM8:AM" & eLastRow)
Set rng2 = ws.Range("DR8:DR" & eLastRow)
Set rng3 = ws.Range("A8:A" & eLastRow)
Set rng4 = wsa.Range("G10:G" & gLastRow)
ws1.Range("K10") = WorksheetFunction.SumIfs(rng1, rng2, ">=3.00", rng3, rng4)
Any assistance would be greatly appreciated.
Thank you,
Lamar
I have a spreadsheet that has 2 sheets (CMPLX-DOWN and CMPLX-DOWN Pivot)
I am trying to have a sumifs formula in "CMPLX-DOWN Pivot" Range("K10:K and lastrow) that looks at the following...
1) Sum the total number of cases in Sheets("CMPLX-DOWN).Range("AM8:AM" and lastrow) where the quantity in column "DR8:DR" and lastrow is greater than or equal to 3.00, where the value in ("CMPLX-DOWN Pivot").Range("G10:G" and lastrow) matches the value in Sheets(CMPLX-DOWN).Range("A8:A" and lastrow).
I have the following code listed below.
Sub Macro90()
Dim eLastRow As Long
Set ws = ThisWorkbook.Sheets("CMPLX-DOWN")
Set ws1 = ThisWorkbook.Sheets("CMPLX-DOWN Pivot")
eLastRow = ws.Cells(Cells.Rows.Count, "A").End(xlUp).row
gLastRow = wsa.Cells(Cells.Rows.Count, "G").End(xlUp).row
Set rng1 = ws.Range("AM8:AM" & eLastRow)
Set rng2 = ws.Range("DR8:DR" & eLastRow)
Set rng3 = ws.Range("A8:A" & eLastRow)
Set rng4 = wsa.Range("G10:G" & gLastRow)
ws1.Range("K10") = WorksheetFunction.SumIfs(rng1, rng2, ">=3.00", rng3, rng4)
Any assistance would be greatly appreciated.
Thank you,
Lamar