FreakyGirl
Member
hello.
I have a worksheet consisting of almost 100 columns but currently only 29 rows.
starting from the first column it breaks down a very long string into workable names & numbers.
it works great - except rows 16, 18 & 27 in the last 8 columns (CN to CL) which are not returning the right numbers.
since all the rows above & below work properly I cant find the problem.
columns BT to CI is all the extracted info from the larger string & is correct. (shown in purple)
the info in those columns need to be put in a different order based by the 1 of 4 letters (B, G, R, Y) found throughout the BT-CI matrix
columns CJ to CM are the positions of those 4 letters & will only be 1, 5, 9 or 13. (shown in gray)
CN to CL is the info in the proper order using IF, & index/match. (shown in white)
as stated all the other rows are correct except for the 3 mentioned.
for example:
CO16 the number showing is 2. the correct number should be 1 as shown in CH16.
the logic for CO16 is as follows:
look in CJ16 & if the number is 1 then index/match BV/BU for the return value, if the number is 5 then index/match BZ/BY, if the number is 9 then index/match CD/CC for the return value, if the number is 13 then index/match CH/CG.
also, on the same row, CS16 is also wrong. the number showing is 2. the correct number should be 1 as shown in CD16.
how can it be wrong when the other rows surrounding it are correct & formulas were dragged down?
thanks in advance for any help.
FreakyGirl
I have a worksheet consisting of almost 100 columns but currently only 29 rows.
starting from the first column it breaks down a very long string into workable names & numbers.
it works great - except rows 16, 18 & 27 in the last 8 columns (CN to CL) which are not returning the right numbers.
since all the rows above & below work properly I cant find the problem.
columns BT to CI is all the extracted info from the larger string & is correct. (shown in purple)
the info in those columns need to be put in a different order based by the 1 of 4 letters (B, G, R, Y) found throughout the BT-CI matrix
columns CJ to CM are the positions of those 4 letters & will only be 1, 5, 9 or 13. (shown in gray)
CN to CL is the info in the proper order using IF, & index/match. (shown in white)
as stated all the other rows are correct except for the 3 mentioned.
for example:
CO16 the number showing is 2. the correct number should be 1 as shown in CH16.
the logic for CO16 is as follows:
look in CJ16 & if the number is 1 then index/match BV/BU for the return value, if the number is 5 then index/match BZ/BY, if the number is 9 then index/match CD/CC for the return value, if the number is 13 then index/match CH/CG.
Code:
=IF(CJ16=1,INDEX($BV$2:$BV$52,MATCH(BU16,$BU$2:$BU$52,0)),IF(CJ16=5,INDEX($BZ$2:$BZ$52,MATCH(BY16,$BY$2:$BY$52,0)),IF(CJ16=9,INDEX($CD$2:$CD$52,MATCH(CC16,$CC$2:$CC$52,0)),IF(CJ16=13,INDEX($CH$2:$CH$52,MATCH(CG16,$CG$2:$CG$52,0))))))
also, on the same row, CS16 is also wrong. the number showing is 2. the correct number should be 1 as shown in CD16.
how can it be wrong when the other rows surrounding it are correct & formulas were dragged down?
thanks in advance for any help.
FreakyGirl