Countif or Sumif or Match? Counting exponents that are labels but weird results

montyfern

Board Regular
Joined
Oct 12, 2017
Messages
65
Good Day All!

Close but no cigar? VBA? Pivots? I have a list with labels where I need to count every instance of ^ or exponents that's embedded in individual cells. It will constantly change. I tried the following formulas:
=COUNTIFS(A2:D2,"*^*") =SUMIF(A2:D2,"*^*",$E$2:$E$11)
=MATCH("^",A2:D11,0)-MATCH("^",A2:D11,0)-3 which gives the dreaded N/A error.

<tbody>
</tbody>

For example:
SO
Support
Type of Meeting
Mechanic
Count
Total
Reginald Smith^2
B. Lawford ^
F2F
R13
2
Patricia Jones ^1
P. Redland
Tele.
U19
1
2
Sidney Poitier ^2
P. Newton
F2F
R02
1
2
Elizabeth Taylor ^2
E. Hernandez
Tele.
U19
1
2
Paul Newman ^2
S. DeLorean
Tele.
R13
1
2
Robert Redford
T. Manilow
F2F
U19
Cecily Tyson ^2
J. Johnson
F2F
U19
1
2
Robert Redford
W. Washington
Tele.
R02
Paul Newman ^2
K. Kowalski
F2F
U19 ^
2
2
Barry Jones ^3
S. DeLorean ^
Tele. ^
R13
3
Aggregate Sum
12
12
Then, I have simple sums which both denote 12 as you can see. Thanks so much.

<tbody>
</tbody>
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Problem is: See Barry Jones has ^3? Three exponents? Countif's and Sumif's only count ONE instance of the exponent. I need a total of EVERY instance of ^ going ACROSS. So, the Barry Jones line should total FIVE not three. Barry has 3 ^, S. Delorean has one, Tele. has one. There's only FOUR columns: SO, Support, Type of Meeting & Mechanic. Does this make sense?
 
Upvote 0
I assumed the first column only would have a caret followed by an integer; columns B through D can have a caret but no integer. I also assumed the integer could go above 9.

I hope this helps.


Book1
ABCDE
1SOSupportType of MeetingMechanicTotal
2Reginald Smith^2B. Lawford ^F2FR133
3Patricia Jones ^10P. RedlandTele.U1910
4Sidney Poitier ^2P. NewtonF2FR022
5Elizabeth Taylor ^2E. HernandezTele.^U193
6Paul Newman ^2S. DeLorean^Tele.R13^4
7Robert RedfordT. ManilowF2FU190
8Barry Jones ^3S. DeLorean ^Tele. ^R135
Sheet1
Cell Formulas
RangeFormula
E2=COUNTIF(B2:D2, "*^*") + IFERROR(--RIGHT(A2, LEN(A2) - SEARCH("^", A2)), 0)
 
Upvote 0
Perfecto thisoldman! I've never used IFERROR & it's years since RIGHT, LEN & SEARCH. *Wow.* ^ ;) Read my Mr. Excel book (Power Excel) and the question starts with: "Using Left, Mid, Right, Find, and Len make my head hurt." Haha I feel their pain but in this case your solution is using them & superb! UBER thanks!
--montyfern
 
Upvote 0
He added new criteria where the formula doesn't work: REVIEW MECHANISM LIST


Mechanism
Reviewable Unit #s

N01s (Contract Proposals)

3 pts for each Contract Proposal

Example:
1 N01= 3
2 NO1s = 6
D43, F30 – F35, G11, K01, K02, K08, K11, K22 - K25, K30, K99, L30, L40, N43, P20, R00, R01, R03, R09, R13, R15, R18, R21, R21/R33, R24, R25, R33, R34, R37, R38, R38/K38, R41 – R44, R61/R33, UC1, UC4, UC6, UC7, U56, U44, U42, U24, U19, U01, T35, T32, SI2/R00, SC2, SC1,SB, RC1, UG3/UH3, UH2, UH2/UH3, UT2, X02, Y01, Y02


1 pt for each single-project application

Example:
1 R01= 1
2 K23s, 1 K22, 1 R03 = 4

U19, P01, UM1, UM2, U54, SI2, P30, P50

5 pts for each multi-project applications

Example:
1 P01= 5
2 U19s = 10
1 U19, 3 PO1s = 20

<tbody>
</tbody>

Now I have to add these exact points .. can you help again please?
 
Upvote 0
What does the hyphen mean in "F30 - F35"? Perhaps it stands for F30, F31, F32, F33, F34, F35?
What is the significance of the slash, as in "R21/R33"?
What's to be done if the mechanism has a carat?

I think another small solved example, is needed.
 
Upvote 0
What does the hyphen mean in "F30 - F35"? Perhaps it stands for F30, F31, F32, F33, F34, F35?
What is the significance of the slash, as in "R21/R33"?
What's to be done if the mechanism has a carat?

I think another small solved example, is needed.

I'm thinking a macro with sumbycolor? Seems too complex to count various carats in various cells, some together. However,
1. Thanks for your quick answer. Yes, to F30 (F30, F31, F32, F33, F34, F35).
2. He means this: "There is only 7 to 10 multi-project mechanisms and they are worth 5 points each. The N01 is classified as a contract and not a grant and its worth 3. The rest are worth 1 point." The slash threw me off too.

What do you think?
 
Upvote 0
How about a lookup table or two?

You have U19 in both the 1-point and the 3-point lists. I removed it from the 1-point list for testing. The 1-point lists extends from cell G2 to cell G67—I don't show the complete list below.

If a mechanism doesn't appear in either list, and is not 'N01', no points are counted.


Book1
ABCDEFGH
1SOSupportMeeting TypeMechanismTotal1 Point3 Point
2Reginald Smith^2B. Lawford ^F2FR134D43P01
3Patricia Jones ^10P. RedlandTele.U1913F30P30
4Sidney Poitier ^2P. NewtonF2FR022F31P50
5Elizabeth Taylor ^2E. HernandezTele.^U196F32SI2
6Paul Newman ^2S. DeLorean^Tele.N01^9F33U19
7Robert RedfordT. ManilowF2FU193F34U54
8Barry Jones ^3S. DeLorean ^Tele. ^R136F35UM1
9G11UM2
Sheet1
Cell Formulas
RangeFormula
E2=COUNTIF(B2:D2, "*^*") + IFERROR(--RIGHT(A2, LEN(A2) - SEARCH("^", A2)), 0) + 5 * (SUBSTITUTE(D2, "^", "") = "N01") + 3 * ISNUMBER(MATCH(SUBSTITUTE(D2, "^", ""), $H$2:$H$9, 0)) + ISNUMBER(MATCH(SUBSTITUTE(D2, "^", ""), $G$2:$G$67, 0))
 
Upvote 0
I must be doing something wrong, as the No1's are 5 points and the U19's are 3. I played around, transposing your 5's & 3's. When I add a ^ it adds a point. Can I send you the file to a DropBox site location? Thanks so much!
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,245
Members
448,555
Latest member
RobertJones1986

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