omidvakili
04-16-2020, 02:47 AM
We have a table like the one below:
26337
We want to write a code that compares all the numbers in a row as follows:
For example, check B3 and C3, if B3 and C3 are unequal to zero
then Enter A (the name of column=B2) to first blank cell in column G
and Enter B (the name of 2nd column=C2) to first blank cell in column H
else do nothing
This comparison continues for all active row in B and C column
check B4 and C4, if B4 and C4 are unequal to zero
then Enter A (the name of column=B2) to first blank cell in column G
and Enter B (the name of 2nd column=C2) to first blank cell in column H
else do nothing
and so on.
26338
After that We must also compare all the rows of columns A and C, A and D, B and C, B and D, C and D. The final result will be as shown below:
26336
26337
We want to write a code that compares all the numbers in a row as follows:
For example, check B3 and C3, if B3 and C3 are unequal to zero
then Enter A (the name of column=B2) to first blank cell in column G
and Enter B (the name of 2nd column=C2) to first blank cell in column H
else do nothing
This comparison continues for all active row in B and C column
check B4 and C4, if B4 and C4 are unequal to zero
then Enter A (the name of column=B2) to first blank cell in column G
and Enter B (the name of 2nd column=C2) to first blank cell in column H
else do nothing
and so on.
26338
After that We must also compare all the rows of columns A and C, A and D, B and C, B and D, C and D. The final result will be as shown below:
26336