#1
|
|||
|
|||
Need help with a formula
Hi everyone,
I am new here so please allow me to greet you, the kind future helper and current reader. I am trying to create a formula that would check values in column with country codes, compare it to a list of valid country codes and if it finds one, check another column with full country names and compare it to a list of valid country names. In essence what my task comes down to is that I have a very long list of records with user account details and need to validate if all of them have country code assigned and if it matches the country name to remove users with missing or incorrect data. My approach to this task would be to create a table of all country codes and country names and perhaps use vlookup or if function to browse through the user list. I will higly appreciate your help with this task. Thank you very, very much (in advance, but will surely thank afterwards as well), Jan |
#2
|
|||
|
|||
Please attach a sheet with a few lines of sample data.
|
#3
|
|||
|
|||
Please find attached (not the original data, but it fully emulates the task ahead)
The formula should display true if the user has a country code and country name assigned and it matches the data in the second table so in the case of Patrick Sandwich it should show false (I didn't add an example where data in one field is missing but it should also show as false). |
#4
|
|||
|
|||
Code:
=if(and(countif(i:i,c2)>0,d2=vlookup(c2,i:j,2,false)),true,false) |
#5
|
|||
|
|||
I haven't tested it yet and will do tomorrow when I'm at the office, but I already want to express my gratitude for your kindness, thank you so much!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need help with a formula | Master_L | Excel | 2 | 12-01-2016 06:06 PM |
Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula | innkeeper9 | Excel | 2 | 09-13-2016 08:59 PM |
formula | rolyreefer | Excel | 1 | 03-14-2016 08:36 AM |
Need help with dragging a formula and changing a reference column as I drag the formula. | LupeB | Excel | 1 | 10-22-2015 03:02 PM |
Need Help w/Formula | OSCAR MARTINEZ | Excel | 1 | 09-28-2013 05:39 AM |