How do I select criteria from one sheet, and post results on a different sheet?

NHagedorn

New Member
Joined
May 11, 2012
Messages
37
Office Version
  1. 365
Platform
  1. Windows
Sub is working great, but not sure how to adjust it to select criteria from sheet CDR with column "C" being the criteria and column "N" the numbers to sum.... posting results on Sheet Results.

Also can anyone explain this sub.... (the different parts) I may need to make some adjustments but not sure what all needs adjusted....
Currently adjusting the dateCol=, For col =, For r =, and seems to work

Thanks
Nate



Sub loop4()
'with dynamic range
'dynamic range (vertical only)
'Get Last used Row
iLastUsedRow = Range("B3").End(xlDown).Row
dateCol = 5
For col = 9 To 9
For r = 3 To 8
'Cells(r,col).FormulaR1C1= "=SUMIFS(R3C3:R16C3, R3C2:R16C2, R3C" & col & ")"
Cells(r, col).FormulaR1C1 = "=SUMIFS(R3C" & dateCol & ":R" & iLastUsedRow & "C" & dateCol & ", R3C2:R" & iLastUsedRow & "C2, R" & r & "C8)"
Next r
dateCol = dateCol + 1
Next col
End Sub
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Watch MrExcel Video

Forum statistics

Threads
1,126,901
Messages
5,621,560
Members
415,846
Latest member
Jrider1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top