Count of Items for Google Sheets

sprigelz

Board Regular
Joined
Jan 7, 2016
Messages
98
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I am attempting to create a count of the below table (Left). As you can see, some items have a - or // in them, and others do not.

I'd like to create a count of the "Type Extracted" basically anything before a special character ("-" or "/"). Results for this example are provided on the right side.

Type Original
Creature - Goblin Soldier
Creature - Goblin Berserker
Creature - Goblin
Enchantment
Instant
Artifact // Land
Creature - Goblin
Enchantment
Legendary Artifact
Legendary Creature - Goblin Warrior
Sorcery
Enchantment
Land - Desert
Type ExtractedCount
Artifact1
Artifact Creature
Basic Land
Creature4
Enchantment3
Instant1
Land1
Legendary Artifact1
Legendary Creature1
Legendary Enchantment
Sorcery1
Token Creature
Tribal Enchantment

Any ideas on how I can create a count that excludes the special characters?
 
Last edited by a moderator:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
this should get what you're looking for
-----------------
Book1
ABCD
1Type OriginalType ExtractedCount
2Creature - Goblin SoldierArtifact1
3Creature - Goblin BerserkerArtifact Creature0
4Creature - GoblinBasic Land0
5EnchantmentCreature4
6InstantEnchantment3
7Artifact // LandInstant1
8Creature - GoblinLand1
9EnchantmentLegendary Artifact1
10Legendary ArtifactLegendary Creature1
11Legendary Creature - Goblin WarriorLegendary Enchantment0
12SorcerySorcery1
13EnchantmentToken Creature0
14Land - DesertTribal Enchantment0
Sheet1
Cell Formulas
RangeFormula
D2:D14D2=COUNTIF($A$2:$A$14,""&C2&"*")
 
Upvote 0
Looks good, the only problem in the real data is that it is counting both Artifact and Artifact Creature.

Don't see any other issues.
 
Upvote 0
Do you have the Textbefore function yet?
If so, how about
Fluff.xlsm
ABCD
1Type OriginalType ExtractedCount
2Creature - Goblin SoldierArtifact1
3Creature - Goblin BerserkerArtifact Creature0
4Creature - GoblinBasic Land0
5EnchantmentCreature4
6InstantEnchantment3
7Artifact // LandInstant1
8Creature - GoblinLand1
9EnchantmentLegendary Artifact1
10Legendary ArtifactLegendary Creature1
11Legendary Creature - Goblin WarriorLegendary Enchantment0
12SorcerySorcery1
13EnchantmentToken Creature0
14Land - DesertTribal Enchantment0
Main
Cell Formulas
RangeFormula
D2:D14D2=SUMPRODUCT(--(C2=TRIM(TEXTBEFORE($A$2:$A$14,{"-","//"},,,1))))
 
Upvote 0
That is something that you have to clearly mention either in the title or in the initial post. Such questions should also be posted in the General Discussion & Other Applications section of the board.
I have done it for you this time.
 
Upvote 0

Forum statistics

Threads
1,223,320
Messages
6,171,432
Members
452,402
Latest member
siduslevis

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