louie_77077

01-16-2005, 09:40 AM

Hi

Dim cl As Range

For Each cl In [Sheet2!A1:C5]

Worksheets("SHEET3").Cells(cl.Value, cl.Column) = "1"

Next cl

here is the code I'm using right now and it works fine as you can see if sheet2 looks like this:

A

1 5

2 9

3 15

4 33

5 40

then the formula will insert a "1" in sheet3 cell A5,A9,A15,A33and A40 the problem is repetitive numbers

if the A column looks like this

A

1 1

2 4

3 1

then sheet 3 column A cell A1 should have a "2" and cell A4 would get "1"

the data is always 3 different numbers or 1 number and 2 repetitive numbers or

3 repetitive( in which case a "3" would be inserted

thanks for any help

lneilson

Dim cl As Range

For Each cl In [Sheet2!A1:C5]

Worksheets("SHEET3").Cells(cl.Value, cl.Column) = "1"

Next cl

here is the code I'm using right now and it works fine as you can see if sheet2 looks like this:

A

1 5

2 9

3 15

4 33

5 40

then the formula will insert a "1" in sheet3 cell A5,A9,A15,A33and A40 the problem is repetitive numbers

if the A column looks like this

A

1 1

2 4

3 1

then sheet 3 column A cell A1 should have a "2" and cell A4 would get "1"

the data is always 3 different numbers or 1 number and 2 repetitive numbers or

3 repetitive( in which case a "3" would be inserted

thanks for any help

lneilson