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: [TABLE="width: 64"]
<tbody>[TR]
[TD="align: right"]=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.
[/TD]
[/TR]
</tbody>[/TABLE]

For example:
[TABLE="width: 576"]
<tbody>[TR]
[TD]SO
[/TD]
[TD]Support
[/TD]
[TD]Type of Meeting
[/TD]
[TD]Mechanic
[/TD]
[TD]Count
[/TD]
[TD]Total
[/TD]
[/TR]
[TR]
[TD]Reginald Smith^2
[/TD]
[TD]B. Lawford ^
[/TD]
[TD]F2F
[/TD]
[TD]R13
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Patricia Jones ^1
[/TD]
[TD]P. Redland
[/TD]
[TD]Tele.
[/TD]
[TD]U19
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Sidney Poitier ^2
[/TD]
[TD]P. Newton
[/TD]
[TD]F2F
[/TD]
[TD]R02
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Elizabeth Taylor ^2
[/TD]
[TD]E. Hernandez
[/TD]
[TD]Tele.
[/TD]
[TD]U19
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Paul Newman ^2
[/TD]
[TD]S. DeLorean
[/TD]
[TD]Tele.
[/TD]
[TD]R13
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Robert Redford
[/TD]
[TD]T. Manilow
[/TD]
[TD]F2F
[/TD]
[TD]U19
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Cecily Tyson ^2
[/TD]
[TD]J. Johnson
[/TD]
[TD]F2F
[/TD]
[TD]U19
[/TD]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Robert Redford
[/TD]
[TD]W. Washington
[/TD]
[TD]Tele.
[/TD]
[TD]R02
[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Paul Newman ^2
[/TD]
[TD]K. Kowalski
[/TD]
[TD]F2F
[/TD]
[TD]U19 ^
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]2
[/TD]
[/TR]
[TR]
[TD]Barry Jones ^3
[/TD]
[TD]S. DeLorean ^
[/TD]
[TD]Tele. ^
[/TD]
[TD]R13
[/TD]
[TD="align: right"]3
[/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Aggregate Sum
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]12
[/TD]
[TD="align: right"]12
[/TD]
[/TR]
[TR]
[TD]Then, I have simple sums which both denote 12 as you can see. Thanks so much.
[/TD]
[TD][/TD]
[TD="align: center"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
You can post the file, after properly anonymizing the data, to a cloud service and post the share link here.

I sent you a private message and you can get back to me.
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
After some off-the forums discussion I found I had an error in the carat count formula.

Also, there can be either one entry or two comma separated entries for the mechanism. If two entries are present the points must be summed together. A further complication is that a mechanism code may appear in more than one points list.

To make the lookup lists dynamic, I used three single-column structured tables in columns L, M, and N. The three-point and the five-point table extend beyond what I show here.


Book1
ABCDEFGHIJKLMN
1SROSupportType of MeetingMechanism1stMech2ndMechCaret PtsMechPts1MechPts2SUM() Total Pts1 Point3 Points5 Points
2Alex SmithD. AlighieriF2FB52B52 0101A20Y07B17
3Blair JohnsonJ. Baldwin^Tele.^B17, Y07B17Y0726311A26P51JU88
4Chris Williams ^3J. RobinsonF2F^B17,B17B17B1746616AR2ME210
5Drew BrownH. GodwinesonTele.Y07, B17Y07B170369B17P30
6Emerson JonesM. CurieTele. ^JU88, Y07JU88Y071539B23P38
7Frankie MillerH. de Soto ^F2FAR2AR21102B52P50
NotTable_NoCondFormtng
Cell Formulas
RangeFormula
E2=TRIM(LEFT(SUBSTITUTE(D2, ",", REPT(" ", 20)), 10))
F2=IF(ISNUMBER(SEARCH(",", D2)), TRIM(SUBSTITUTE(D2, E2 & ",", "")), "")
G2=COUNTIF(A2:D2, "*^*") + ISNUMBER(--RIGHT(A2)) * IFERROR(--RIGHT(A2, LEN(A2) - SEARCH("^", A2)) - 1, 0)
H2=ISNUMBER(MATCH(E2, x1Tbl[1 Point], 0)) + 3 * ISNUMBER(MATCH(E2, x3Tbl[3 Points], 0)) + 5 * ISNUMBER(MATCH(E2, x5Tbl[5 Points], 0))
I2=ISNUMBER(MATCH(F2, x1Tbl[1 Point], 0)) + 3 * ISNUMBER(MATCH(F2, x3Tbl[3 Points], 0)) + 5 * ISNUMBER(MATCH(F2, x5Tbl[5 Points], 0))
J2=SUM(G2:I2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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