# Compare List Lines

This topic is 5770 days old. Please don't post here. Open a new topic instead.

## Recommended Posts

Hi Folks,

I need some help with a Recursive CF.

I need to compare each value in a MASTER list to the same value in another List (A). The result will be a percentage of exact matches of the master list. Example:

List A = A¶B¶B¶A¶C¶C¶A¶A¶D¶D

MASTER = A¶B¶B¶A¶C¶C¶A¶A¶D¶D

Matches=10/10

Result= 100

List A = A¶B¶B¶A¶C¶C¶A¶A¶D¶D

MASTER = A¶B¶C¶A¶C¶B¶A¶A¶D¶D

Matches=8/10

Result= 80

List A = A¶B¶B¶A¶C¶C¶A¶A¶D¶D

MASTER = B¶B¶C¶A¶C¶B¶A¶A¶A¶B

Matches=5/10

Result= 50

etc...

Both List will have the the same amount of values although the quantity of values (lines) will vary.

Some values in List A will be null or blank which is considered a non-match.

##### Share on other sites

Just a quick question ... I don't really understand "Both List will have the the same amount of values although the quantity of values (lines) will vary." You mean the number of entries will always be the same (in your example, there are 9 carriage returns; 10 values). Will that remain consistent in all lists? I ask because, if there aren't always the same number of slots, how will we know which ¶ (null) replaces which value (missing slot location)? Make sense?

Edited by Guest
Changed wording
##### Share on other sites

Just a quick question ... I don't really understand "Both List will have the the same amount of values although the quantity of values (lines) will vary." You mean the number of entries will always be the same (in your example, there are 9 carriage returns; 10 values). Will that remain consistent in all lists? I ask because, if there aren't always the same number of slots, how will we know which ¶ (null) replaces which value (missing slot location)? Make sense?

YES!

Sorry about that. What I mean is MASTER LIST will always have the same number of lines as List A, BUT the total lines will change. For example:

List A=10 Master List=10

List A=8 Master List=8

List A=5 Master List=5

etc...

Does this mean sense?

##### Share on other sites

This file shows two ways of doing it: with repeaters and with a custom function.

Compare_List_Lines.zip

##### Share on other sites

Thanks! The CF works perfectly.

##### Share on other sites

This topic is 5770 days old. Please don't post here. Open a new topic instead.

## Create an account

Register a new account