Hello All,
I'm working on a formula that will auto populate total payroll for different departments. I will use this to compare the current month to the previous month for each department within a single workbook. Both the previous month and current months payroll spreadsheets will be included in the workbook. I could write the code as, =sumifs(previous!D:D,previous!H:H,"=Management",previous!G:G,">600000") and rename each sheet to current and previous. I would rather not have to rename the sheets for ease of use, since there will be 12 of them per year and seeing each months named sheet will be less confusing for anyone else looking at the work.
At the top of each chart on my analysis spreadsheet I name the columns of data Jan and Feb, for example, which is the same name as the sheet containing the payroll for each month. I would like the formula to recognize what I type in that specific cell and correlate it to the matching sheet to pull the info.
In other words if I type Jan in a given cell, I want the macro to do =sumifs(Jan!D:D,Jan!H:H,"=Management",Jan!G:G,">600000"), where the sheet I import into the analysis workbook will be named Jan.
Thoughts?
Thanks in advance
A side question, I condensed this code as the forum will not allow me to post a 'less than symbol'. Any thoughts why? I get a popup from securi firewall which our IT guy says is not our firewall.
Bookmarks