MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

compare rows

  Asked By: Jody    Date: Oct 12    Category: MS Office    Views: 398

I have some data, only the values zero and one

1 0 1 0 1 1
1 0 1 0 1 0
: ;
; :
for example number of total colums is 7 and rows is 50, if row 1 = row2 , row
3, row 4. Then 8th col of row should come the number 4 ...how can solve this
problem using excel macro... if anybody know pls help



4 Answers Found

Answer #1    Answered By: Minnie Romero     Answered On: Oct 12

Can you give us a little more information please?

Do you ignore rows  5,6 & 7
If rows 1,2,3 = 1 then should you get 3 in row  8?... Are you summing rows
1-4 into row 8?
What do you want for rows 9 till 50? Is the operation repeated every 8 rows?

Answer #2    Answered By: Madison Campbell     Answered On: Oct 12

I think he wants a number  in the eighth column (immediately to the right of
the data) showing how many identical rows  there are in succession immediately
prior to the row.

I think he wants this only where the following row  is different from the
present row. i.e at the end of each sequence.

I would assume all the rows are filled.

Answer #3    Answered By: Duane Walker     Answered On: Oct 12

There are 7 col and 50 rows  , each cell contain the values  zero and one
only, i want to find out how many rows are equal.. each col should contain the
value of 0 and one .

if first row  can equal to the 4, 5 and 6 , (colum range is to from a1:a7).
then value a8 should contain the value 4. that means how many rows are equal.as
like i want to check row values up to 8.. I think it can done in loops. if u
can pls  help me.

Answer #4    Answered By: Quinn Johnson     Answered On: Oct 12

I think you are confused about what is a row  and what is a column. I am also
not sure if you want all identical rows  counted or only successive ones.

Try this

In H1 put =G1+2*F1+4*E1+8*D1+16*C1+32*B1+64*A1
In I1 put =COUNTIF($H$1:$H$50,H1)

Now select both those cells and copy them down all the rows to row 50.

If you want you can hide column H

Does this give you what you want?

Didn't find what you were looking for? Find more on compare rows Or get search suggestion and latest updates.