Help with Countif and Index Match

CTMom

New Member
Joined
Jul 4, 2004
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hi I need help with this formula (for some reason the add-in to load the actual spreadsheet is not working so apologies for copy and paste) - trying to count number of times the word occurs in each financial year and formula not working. First table has the data only. Year is just =year(Sale Date) so I can match year below.

Data Table
Sale DateYearSale Type
Holly5/05/20182018Online
Carter3/09/20192019Online
Serena3/10/20192019Referral
Parker1/07/20202020Channel
Sloane2/07/20202020Direct
Holly4/07/20202020Direct
Carter1/01/20202020Direct
Serena5/08/20212021Referral
Serena6/04/20212021Referral
Parker4/04/20222022Channel
Serena5/08/20222022Channel

Formula in B2 and rest of table is:
=COUNTIF(INDEX($D$14:$E$24,MATCH(B$1,$D$14:$D$24,0),),$A2)

20182019202020212022
Direct-----
Online1.001.00---
Referral---1.00-
Channel--1.00-1.00
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try it like
Excel Formula:
=COUNTIFS($D$14:$D$24,B$1,$E$14:$E$24,$A2)
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try it like
Excel Formula:
=COUNTIFS($D$14:$D$24,B$1,$E$14:$E$24,$A2)
Thanks for responding so quickly! worked perfectly.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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