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
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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
Back
Top