Forum Discussion
BTHeyd
Sep 28, 2022Copper Contributor
IF
I am trying to write a formula that would look something like: =IF(B2=B1, Copy C2, None) This formula would be in cell C1. If B2 matches B1 then copy the value from C2 to C1, otherwise do nothi...
- Sep 28, 2022it could be a number of things but basically the text in B33 and B34 aren't EXACTLY the same. It could be an extra space, it could be a non-displayed control character, or something else.
This is one of many reasons why data validation for values like this are so important (i.e. only allow values from a list of valid entries).
How are the values in column B entered? Is this just a 1 off or is this part of a very long list with many similar issues? Why are you even repeating cell information like this anyhow?
mtarler
Sep 29, 2022Silver Contributor
what it really sounds like is you need to do a VLOOKUP or XLOOKUP and if you are using Excel 365 then you have dynamic arrays so you don't even need to copy down you can just do it using 1 formula. Something like:
=VLOOKUP($A$1:$A$100, othersheet!$A$1:$B$10000, 2, FALSE)
=VLOOKUP($A$1:$A$100, othersheet!$A$1:$B$10000, 2, FALSE)
BTHeyd
Sep 30, 2022Copper Contributor
Thanks. All set, onto bigger problems.