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

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It will be Column I - Below is a lit of example numbers

[TABLE="width: 186"]
<tbody>[TR]
[TD]250013475[/TD]
[/TR]
[TR]
[TD]90122975[/TD]
[/TR]
[TR]
[TD]170037827[/TD]
[/TR]
[TR]
[TD]90122435[/TD]
[/TR]
[TR]
[TD]90122799[/TD]
[/TR]
[TR]
[TD]120067617[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 
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,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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