Forum Discussion
Do a search/sort/sum in an excel workbook and put results in another workbook
- Sep 19, 2021Just pouring through this now...it is perfect, thank-you!! still playing with how i can expand etc. YOU ROCK
OK, here's a start. I've modified the sheets "CIndy" and "Allison" to make them Excel Tables, with the names "Cindy" and "Allison". Doing this makes it possible for you to continue to add rows to either of them and have the formulas take into account added rows.
I've also assumed that some hours will be coded "1" as you suggest, but that others might be coded 2 or 3, etc., so I've covered that possible scenario as well.
Then in the Summary sheet, the set up is as seen below, and the formula for cell D5 is visible in the formula bar, that being: =SUMIF(Cindy[CODE],D$3,Cindy[HOURS])
- sboland61Sep 19, 2021Copper Contributorgot the tables in and cleaned some other things up. I cannot get the other tab totals (Sharon, Suzanne, Capitol One, Mountain West and Monthly Operations to add up and map over to summary tab. I thought i would be able to replace the tab names in the formula from Cindy - > Sharon (for each tab). the formula: =SUMIF(Sharon[CODE],D$4,Cindy[HOURS]) results in an error. What is D$4?
- mathetesSep 19, 2021Silver Contributor
D$4. is a reference to a cell toward the top of the summary sheet. The dollar sign keeps the reference to row 4 even if the column changes; it's called an "absolute reference". As I said in my earlier post, I was assuming that you'd have codes OTHER THAN 1, so created a way for those to be handled; hence the codes 2----
That said, the formulas' references to Cindy and so forth are references to a table name; some of the new ones that you created are called Table5, Table8, and so forth.
If I were doing this myself, unless there were compelling reason to have separate sheets for each source, I'd make them all a single database and have the summary still able to separate them different entities out by selection criteria. Having separate sheets--although cleaner for human beings to look at--actually gets in the way of a clean and simple Excel formula, as you're discovering. You need to write a different formula for each entity, rather than using one formula and referring to the names.....
If you're able to put all those billing hours into one table, regardless of source--just adding a column to identify whether it's Cindy or Allison or.....--let me know and I can show you that.
- sboland61Sep 19, 2021Copper Contributor
- mathetesSep 19, 2021Silver Contributor
Do a little reading here to help understand the terms I used in that last message
https://exceljet.net/excel-tables
https://exceljet.net/glossary/named-range
https://exceljet.net/glossary/mixed-reference