View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JS SL JS SL is offline
external usenet poster
 
Posts: 49
Default Macro needed for identify relations between rows.

Hello,

Allways nice to figur something out that's looks impossible.
Perhaps a challange for somebody :)

I've got a sheet with several records and I have to check some relations.
It's looks to complex to do this by formulas so perhaps a code (which is to complex for me) can help me out.

In text it looks like;

The code should runs resulting in column AE;

For each row from record 2 till last;

for each row i

start rule;
If(AAi<4 then set 0 END CODE

otherwise;
If(and(AAi=4;CBi="") then set 2 END CODE

otherwise;
If field CBi containts neither "*K*" or "*Z*" then set 3 END CODE

otherwise;

if field CBi contains text "*K*"
then check in all other rows (except in row CBi !!) where the name in column AH (all rows!!) is the same as the name in field AGi, then check if in at least one of the rows of those identical ones, if in column CA also one times at least the text "*K*" is registered.

If it is then register "K-oke" and otherwise "K-noke"

otherwise;

if field CBi contains text "*Z*"
then check in all other rows (except in row CBi !!) where the name in column AH (all rows!!) is the same as the name in field AGi, then check if in at least one of the rows of those identical ones, if in column CA also one times at least the text "*Z*" is registered.

If it is then register "Z-oke" and otherwise "Z-noke"

So, that is looking complex.

Somebody like to solve. Please help !

regards, Johan