Count / Sumproduct Help

MJLG85

New Member
Joined
Jan 24, 2018
Messages
40
Hello

I am trying to write a formula that will go through a column of numbers/receipt codes and will count how many times a set first two numbers appear (as the first two numbers determine a location)


any help would be appreceiated as I am struggling to write this forumla correctly

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
It will be Column I - Below is a lit of example numbers

250013475
90122975
170037827
90122435
90122799
120067617

<tbody>
</tbody><colgroup><col></colgroup>
 
Upvote 0
So it would be that column... how many times '90' appeared in the column

I have this one which is going through the column and everytime 90 appears in I its adding the value of it

=SUMPRODUCT((LEFT(Data!$I$2:$I$1000,2)=LEFT(B2,2))*Data!$J$2:$J$1000)

but I just need to know how many times 90 appears in column I


I just can't figure out how to just do a count of that column, I feel like its something obvious but i just cant see it
 
Last edited:
Upvote 0
So it would be that column... how many times '90' appeared in the column

I have this one which is going through the column and everytime 90 appears in I its adding the value of it

=SUMPRODUCT((LEFT(Data!$I$2:$I$1000,2)=LEFT(B2,2))*Data!$J$2:$J$1000)

but I just need to know how many times 90 appears in column I


I just can't figure out how to just do a count of that column, I feel like its something obvious but i just cant see it

=SUMPRODUCT((LEFT(Data!$I$2:$I$1000,2)=LEFT(B2,2))*Data!$J$2:$J$1000)

is testing the first two digits in I which equals to the first two digits of B2 and summing corresponding J values.

Counting the occurrences of the first two digit number of B2 as first two digits in I...

SUMPRODUCT(((LEFT(data!$I$2:$I$1000,2)=LEFT(B2,2))+0))
 
Upvote 0
=SUMPRODUCT((LEFT(Data!$I$2:$I$1000,2)=LEFT(B2,2))*Data!$J$2:$J$1000)

is testing the first two digits in I which equals to the first two digits of B2 and summing corresponding J values.

Counting the occurrences of the first two digit number of B2 as first two digits in I...

SUMPRODUCT(((LEFT(data!$I$2:$I$1000,2)=LEFT(B2,2))+0))



Thank you... this works great!
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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