Comparing Columns and returning value
Closed
Werdna
-
Apr 14, 2010 at 09:34 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 15, 2010 at 03:06 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Apr 15, 2010 at 03:06 PM
Related:
- Comparing Columns and returning value
- Display two columns in data validation list but return only one - Guide
- Tweetdeck larger columns - Guide
- If cell contains date then return value - Excel Forum
- Based on the values in cells b77:b81, what function can automatically return the value in cell c77? ✓ - Excel Forum
- If cell A1 has text then cell B2 has today's Date ✓ - Excel Forum
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 14, 2010 at 10:50 AM
Apr 14, 2010 at 10:50 AM
You want to use VLOOKUP
=VLOOKUP(A1, C:D, 2, false)
=VLOOKUP(A1, C:D, 2, false)
Apr 14, 2010 at 01:03 PM
However excel always shows "N/A" when I use that code.
Apr 14, 2010 at 02:12 PM
Apr 15, 2010 at 01:55 PM
It works now, thanks!!
And how would the formula look if column "D" wasn't next to "C"?
Also, because this will be for a longer list, isn't there something I can add to the formula so it won't return "#N/A" when it doesn't find a matching name? Like just leaving it blank or preferably using conditional formatting to change the "new" name in column A?
Again, thanks for your help!
Apr 15, 2010 at 03:06 PM
=VLOOKUP(A1, C:D, 2, false)
A1: Is the value that we are using to find the corresponding value
C:D is the range that we are using to match A1 and find the corresponding value
2: if you notice C and D makes two column. When match is found, it is saying use the 2nd column
false is saying that match has to be exact
Basically in long english the formula is saying look for value A1 in column C and when match is found, use the second column in range C:D ( which would be D) to give me its value