View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default The 4th column D to be filler.

I don't think that modification will work unless the data is sorted by Col
B, then Col C.


No it won't work on unsorted data but the sample posted by the OP is sorted.

--
Biff
Microsoft Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
If I understand what the OP wants, I don't think that modification will
work unless the data is sorted by Col B, then Col C. Here is some data
modified to make it easier to see the problem with unsorted data in Col C
(I changed the time-looking entries to simple letters)...

A B C D E

7/30/2007 1004 a 1 1
7/31/2007 1004 a 2 2
8/1/2007 1004 b 1 1
8/2/2007 1004 a 1 3
7/30/2007 1005 c 1 1
7/31/2007 1005 a 1 1
8/2/2007 1005 a 2 2
8/3/2007 1005 c 1 2
7/30/2007 1007 a 1 1
7/30/2007 1007 c 1 1
7/31/2007 1007 c 2 2
7/31/2007 1007 b 1 1
8/1/2007 1007 a 1 2
8/2/2007 1007 b 1 2
8/2/2007 1007 c 1 3
8/3/2007 1007 c 2 4

Column D shows the results from the formulas you supplied and Column E
shows what I think they should be. If columns B and C are properly sorted,
then your formulas will work (but, given the OP's reluctance to give us
info, who knows if that is the condition of the original data or not). I
would point out that the COUNTIF solution I provided (even though it
requires a helper column) is not dependent on any of the rows being
sorted.

Rick


"T. Valko" wrote in message
...
Using your formula Can it be modified to look in 2
Colums ( Col B and Col C )


If you have a lot rows of data you'd be better off using Harlan's formula
slightly modified:

D1 = 1

D2: =IF(B2&C2=B1&C1,D1+1,1)

Copied down as needed.

--
Biff
Microsoft Excel MVP


"Steved" wrote in message
...
Hello Rick from Steved

Thankyou please excuse my igorance I was in a hurry to put this issue
out
there.

=COUNTIF($B$1:B1,B1)

Using your formula Can it be modified to look in 2 Colums ( Col B and
Col C )

Thankyou.


"Rick Rothstein (MVP - VB)" wrote:

You haven't told us exactly what duplicates you are trying to count...
Col
B, Col C or some combination of Col B and Col C. From your sample, it
looks
like Col B and Col C, when duplicated, will always be duplicated (entry
in
Col C the same for each duplicated value in Col B with Col A not
figuring in
the counting process at all). Here is a formula to count Col B items
(assuming your first data row is 1)...

D1: =COUNTIF($B$1:B1,B1)

Then copy it down through all of your rows of data. If this is not what
you
want, then you will need to clarify exactly what you are trying to
count.

Rick



"Steved" wrote in message
...
Hello Tryo from Steved

Tryo I have emailed to a worksheet that has 3 Colums Col A, Col B,
Col C

The objective is in Col D which is empty I would Like to put add a
count
function.

If duplicates are found then do a count for example if the next 5
rows
contain the same information the put value 1 to 5 Cell D1 will have
value
1,
Cell D2 will have the Value 2, Cell D3 will have value 3 for example,
as
set
out below.

Col A Col B Col C Col D
30/07/2007, 1004, 15:30, 1
31/07/2007, 1004, 15:30, 2
1/08/2007, 1004, 15:30, 3
2/08/2007, 1004, 15:30, 4
30/07/2007, 1005, 15:30, 1
31/07/2007, 1005, 15:30, 2
2/08/2007, 1005, 15:30, 3
3/08/2007, 1005, 15:30, 4
30/07/2007, 1007, 15:20, 1
30/07/2007, 1007, 15:20, 2
31/07/2007, 1007, 15:20, 3
31/07/2007, 1007, 15:20, 4
1/08/2007, 1007, 15:20, 5
2/08/2007, 1007, 15:20, 6
2/08/2007, 1007, 15:20, 7
3/08/2007, 1007, 15:20, 8

Thankyou.









"Tyro" wrote:

I have no idea what you are asking. Do you speak English?

"Steved" wrote in message
...
Hello from Steved


Below I've Columns A,B,C, What I would like please is a formula
the
would
find the Duplicates, if none found the put the number 1 in Column
D, If
Dupicates found then goto the first put in 1 then the second
Duplicate
put
in
2, if a third found then put in 3, if a fourth is found then put
in 4
and
so
on. for example if There is 8 duplicates found then I will see
1,2,3,4,5,6,7,8 in D1, I will see 1 D2, I will see 2 in D3 I will
see 3
and
so on.

30/07/2007 1004 15:30
31/07/2007 1004 15:30
1/08/2007 1004 15:30
2/08/2007 1004 15:30
30/07/2007 1005 15:30
31/07/2007 1005 15:30
2/08/2007 1005 15:30
3/08/2007 1005 15:30
30/07/2007 1007 15:20
30/07/2007 1007 15:20
31/07/2007 1007 15:20
31/07/2007 1007 15:20
1/08/2007 1007 15:20
2/08/2007 1007 15:20
2/08/2007 1007 15:20
3/08/2007 1007 15:20

Thankyou.