ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Countif Use (https://www.excelbanter.com/excel-worksheet-functions/119959-countif-use.html)

larryf666

Countif Use
 
I have a line of 500 order numbers & need to break it down into how many line
refer to the different order numbers, i.e o/n 100002 = 2 lines 100003 = 3
lines 100004 = 2 lines = 7 lines on the orders total. Is there any way that
I can sort the column so it counts each individual order number as 1 without
taking into account how many lines are actually in the order, i.e o/n 100002
= 2 lines 100003 = 3 lines 100004 = 2 lines = 3 order numbers total. I hope
I have explained this well enough for some one to assist.
Regards Larry

Max

Countif Use
 
Assuming order numbers in A1 down,
In B1: =COUNTIF(A:A,A1)
Copy down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"larryf666" wrote:
I have a line of 500 order numbers & need to break it down into how many line
refer to the different order numbers, i.e o/n 100002 = 2 lines 100003 = 3
lines 100004 = 2 lines = 7 lines on the orders total. Is there any way that
I can sort the column so it counts each individual order number as 1 without
taking into account how many lines are actually in the order, i.e o/n 100002
= 2 lines 100003 = 3 lines 100004 = 2 lines = 3 order numbers total. I hope
I have explained this well enough for some one to assist.
Regards Larry


daddylonglegs

Countif Use
 
Are you trying to get a count of unique order numbers? Assuming the order
numbers are in A1:A500 try

=SUMPRODUCT((A1:A500<"")/COUNTIF(A1:A500,A1:A500&""))

"larryf666" wrote:

I have a line of 500 order numbers & need to break it down into how many line
refer to the different order numbers, i.e o/n 100002 = 2 lines 100003 = 3
lines 100004 = 2 lines = 7 lines on the orders total. Is there any way that
I can sort the column so it counts each individual order number as 1 without
taking into account how many lines are actually in the order, i.e o/n 100002
= 2 lines 100003 = 3 lines 100004 = 2 lines = 3 order numbers total. I hope
I have explained this well enough for some one to assist.
Regards Larry


Martin Fishlock

Countif Use
 

Try a pivot table with the count variable.
--
Hope this helps
Martin Fishlock


"larryf666" wrote:

I have a line of 500 order numbers & need to break it down into how many line
refer to the different order numbers, i.e o/n 100002 = 2 lines 100003 = 3
lines 100004 = 2 lines = 7 lines on the orders total. Is there any way that
I can sort the column so it counts each individual order number as 1 without
taking into account how many lines are actually in the order, i.e o/n 100002
= 2 lines 100003 = 3 lines 100004 = 2 lines = 3 order numbers total. I hope
I have explained this well enough for some one to assist.
Regards Larry


larryf666

Countif Use
 
Spot on this worked a treat, it gave me all the information I required.

THANX

Larryf666

"daddylonglegs" wrote:

Are you trying to get a count of unique order numbers? Assuming the order
numbers are in A1:A500 try

=SUMPRODUCT((A1:A500<"")/COUNTIF(A1:A500,A1:A500&""))

"larryf666" wrote:

I have a line of 500 order numbers & need to break it down into how many line
refer to the different order numbers, i.e o/n 100002 = 2 lines 100003 = 3
lines 100004 = 2 lines = 7 lines on the orders total. Is there any way that
I can sort the column so it counts each individual order number as 1 without
taking into account how many lines are actually in the order, i.e o/n 100002
= 2 lines 100003 = 3 lines 100004 = 2 lines = 3 order numbers total. I hope
I have explained this well enough for some one to assist.
Regards Larry



All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com