Syntax

Pilule

Board Regular
Joined
Nov 17, 2013
Messages
95
Office Version
  1. 2013
Platform
  1. Windows
I'm having problems with the syntax of a function. I want to count the number of time a number comes up, my formula would be;

=COUNTIF(A1:A50,A1<>A2). It's the A1<>A2 that I can't get to plug in correctly.

What would the SUMPRODUCT function look like to do the same thing?

Thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
An example with expected results would have been helpful.

Consider the following


Excel 2010
ABC
1124
212
314
414
515
615
716
1b
Cell Formulas
RangeFormula
B1=SUMPRODUCT(--(A1:A50<>A2:A51))
 
Upvote 0
It works.

Where could I find more information on how to use SUMPRODUCT? This function doesn't seem to bee well documented.

Thanks
 
Upvote 0
The SUMPRODUCT formula will have a problem if a number reoccurs later in the list.

Perhaps:
=SUM(1/COUNTIF(A1:A7,A1:A7))

Confirm with CTRL-SHIFT-ENTER rather than just Enter.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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