Grasor
Board Regular
- Joined
- May 16, 2014
- Messages
- 123
- Office Version
- 365
- Platform
- Windows
Good afternoon,
This week IT updated our office suite to 365 but defaulted the Macro security settings from "with notification" to "require digital signature". However, we can't seem to get digital signatures to work and now are macros are all useless. That's a separate matter I'm trying to work out with enterprise IT, I'm hopeful they see the error of their ways and return to the original setting that's worked seemingly fine for at least my past 15 years working on these.
For now, I'm trying to address an issue that would be handily resolved with a custom VBA function.
I have running table of status codes assigned to personnel which describe their status on a particular day. My manager wants to quickly determine which codes are considered "Present" or "Absent" by referencing a 2nd table of values. He wants to be able to adjust which codes are considered "Present" or "Absent" by adjusting the reference in the 2nd table in case policy changes the outcome for each individual code.
What I have done so far is use
to get the numbers I should get, but I can't figure out how to change the arrayed portion to a table reference.
Any ideas?
This week IT updated our office suite to 365 but defaulted the Macro security settings from "with notification" to "require digital signature". However, we can't seem to get digital signatures to work and now are macros are all useless. That's a separate matter I'm trying to work out with enterprise IT, I'm hopeful they see the error of their ways and return to the original setting that's worked seemingly fine for at least my past 15 years working on these.
For now, I'm trying to address an issue that would be handily resolved with a custom VBA function.
I have running table of status codes assigned to personnel which describe their status on a particular day. My manager wants to quickly determine which codes are considered "Present" or "Absent" by referencing a 2nd table of values. He wants to be able to adjust which codes are considered "Present" or "Absent" by adjusting the reference in the 2nd table in case policy changes the outcome for each individual code.
What I have done so far is use
Excel Formula:
=SUM(COUNTIF(Range,{"Code1","Code2","Code3","etc"}))
Any ideas?
Example.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
4 | Names | 3/1/2022 | 3/2/2022 | 3/3/2022 | 3/4/2022 | 3/5/2022 | Reference Table | |||||
5 | Person 1 | P | C | C | P | P | P | PRESENT | ||||
6 | Person 2 | E | P | P | P | P | E | PRESENT | ||||
7 | Person 3 | K | M | M | P | P | K | PRESENT | ||||
8 | Person 4 | C | U | U | U | C | C | PRESENT | ||||
9 | M | ABSENT | ||||||||||
10 | Count Present | 4 | 2 | 2 | 3 | 4 | U | ABSENT | ||||
11 | Count Absent | 0 | 2 | 2 | 1 | 0 | ||||||
12 | Total | 4 | 4 | 4 | 4 | 4 | ||||||
Example Sheet |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B10:F10 | B10 | =SUM(COUNTIF(B5:B8,{"P","E","K","C"})) |
B11:F11 | B11 | =SUM(COUNTIF(B5:B8,{"M","U"})) |
B12:F12 | B12 | =SUM(B10:B11) |