Cannot use Pivot Table - I think I need sumifs

learningexcel2020

New Member
Joined
Feb 9, 2020
Messages
10
Office Version
  1. 2010
Platform
  1. Windows
I have attached a spreadsheet of what i have been trying to do for weeks. Management will NOT let me use pivot tables. I am trying to calculate from a date range, the customer name, they type of labor they reported for the week (according to what project they worked on) then sum the total of hours.
I have a large amount of data i will enter in one spreadsheet - I want the formulas in another sheet, pulling the data from the download, in a neat way management can read it.

I would really, really, really appreciate some hlep. I have tried and tried and i have come up with 'date value' 'index' 'sumifs' but i can't find a way to get everything together.

Thanking you in advance.
employees.pngemployees.png
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Out of interest, why won't they let you use pivot tables?
 
Upvote 0
Management does not like them. They want a formula that i can plug into another sheet and have it calculate automotacilly. They have forgotten to 'refresh' pivot tables in the past and have reported the wrong information.
 
Upvote 0
I think you'd be better off automating the refresh of a pivot table. It will be a lot simpler than any formula that can do that, in my opinion.
 
Upvote 0
How do you automate refreshing of a pivot table?

I was thinking if i could create the formula, copy it for every week I need it, it would just populate and management is happy. but i have spent hours trying to get the formula to work. One issue is the employees having multiple labor numbers.
 
Upvote 0
All you need is basically:

Code:
Sub UpdatePivotTable()
Sheets("sheet name").Pivottables(1).RefreshTable
End Sub

and then call it from the relevant Worksheet_Activate event so that as soon as you switch to the sheet with the pivot table, it updates.
 
Upvote 0
VBA in fact, but similar enough.
 
Upvote 0
Thanks, i would have to go into the visual basic for excel to write this? Sorry, i haven't done that.
 
Upvote 0
Yes, you would open the VB Editor (Alt+f11), then Insert - Module from the menu, and paste that code in. Then go back to the Excel window, right click the tab for the sheet that has the pivot table on it, choose View Code and then paste this in:

VBA Code:
Private Sub Worksheet_Activate()
UpdatePivotTable
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,395
Members
449,081
Latest member
JAMES KECULAH

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