Morgan Moore
New Member
Hi All,
I am using a formula to look into a tab ("Calculations") to return a value if two criteria from this tab ("Report") match. This formula works very well except when the matching criteria is a number with text next to it.
For example, I need to match sample number ("K2") 12345 with the sample number on the other tab. If 12345 is present then it returns the proper value. Let's say I run the sample in duplicate or triplicate. Then the sample number becomes 12345A, 12345B, and 12345C respectively. Even if the sample numbers are actually the same, the formula is not matching and returning the value. I tried re-naming as 12345-1, 12345-2, etc, but doesn't seem to recognize that either.
Here is the formula:
=INDEX(Calculations!$X$1:$X$500,MATCH(1,IF(Calculations!$Q$1:$Q$500=--$K$2,IF(Calculations!$B$1:$B$500=$D8,1)),0))
I tried making both tabs "General" format, but it doesn't seem to work. Any advice? I don't really want to do a major overhaul of the formula unless it can be plugged into VBA and loop until it finds the last sample in the list? I'm not even sure where to start with that.
I have the same issue with this LOOKUP formula to find the sample number and return product name:
=IFERROR(VLOOKUP(--K2,SampleInfo!C:E,3,0),"No Product Name")
It does work if i remove the "--" from "--K2" however, it will not work for just numbers (12345), so I'm at a loss here.
All of these formulas are tied to one another. It is a complex workbook that also uses VBA to get the job done faster. I am sorry if I left important information out...please feel free to ask anything if it will help solve this issue.
Thanks for your input!
I am using a formula to look into a tab ("Calculations") to return a value if two criteria from this tab ("Report") match. This formula works very well except when the matching criteria is a number with text next to it.
For example, I need to match sample number ("K2") 12345 with the sample number on the other tab. If 12345 is present then it returns the proper value. Let's say I run the sample in duplicate or triplicate. Then the sample number becomes 12345A, 12345B, and 12345C respectively. Even if the sample numbers are actually the same, the formula is not matching and returning the value. I tried re-naming as 12345-1, 12345-2, etc, but doesn't seem to recognize that either.
Here is the formula:
=INDEX(Calculations!$X$1:$X$500,MATCH(1,IF(Calculations!$Q$1:$Q$500=--$K$2,IF(Calculations!$B$1:$B$500=$D8,1)),0))
I tried making both tabs "General" format, but it doesn't seem to work. Any advice? I don't really want to do a major overhaul of the formula unless it can be plugged into VBA and loop until it finds the last sample in the list? I'm not even sure where to start with that.
I have the same issue with this LOOKUP formula to find the sample number and return product name:
=IFERROR(VLOOKUP(--K2,SampleInfo!C:E,3,0),"No Product Name")
It does work if i remove the "--" from "--K2" however, it will not work for just numbers (12345), so I'm at a loss here.
All of these formulas are tied to one another. It is a complex workbook that also uses VBA to get the job done faster. I am sorry if I left important information out...please feel free to ask anything if it will help solve this issue.
Thanks for your input!