I'm trying to create an Excel formula to test if every cell of a range meet a condition on each cell of another range. If the condition is met, loop will continue to the upper cells of the columns by doing same things.
As a result, I would like to get all the combinations of strings, created by the columns where the condition is met.
| |A|B|C|D|E|F|
|Row1|5|3|2|7|5|1|
|Row2|6|5|1|7|6|2|
|Row3|8|4|2|6|5|4|
In my mind, would be a combinations of "for each" and "if" but I really don't know how to make it working on Excel.
I think vba could help with this but I'm not able to code it. In my previous example condition to be checked is if every cell of range A3:C3 is bigger than any cell of range D3:F3 and "keep" the combination of columns when is true; IE: AD, AE, AF ... Next, do same things on Row2 and Row3.
Final result will be a string made by concatenating all combinations where condition is met, going bottom-up.
Result of previous example are all following combinations:
ADAFAF ADAFBF ADAFCF ADBFAF ADBFBF ADBFCF AEAFAF AEAFBF AEAFCF AEBFAF AEBFBF AEBFCF AFAFAF AFAFBF AFAFCF AFBFAF AFBFBF AFBFCF
I hope I've explained well my request and really would appreciate your support to help me solving my problem.
Thank you very much
Aucun commentaire:
Enregistrer un commentaire