简体   繁体   中英

excel and mechanical turk

I am trying to search for identical strings in different columns and cells of the same excel worksheet. Specifically, i am trying to use it to approve people for mechanical turk. I copy and paste a list of people's MTurk ID's into the downloaded CSV file (from mechanical turk) that I use to approve people. So I add two columns at the end of this downloaded csv file, they are Mturk ID and 1 or 0, indicating whether they should be approved. I am trying to write a function that will search the two columns that contain all MTurk ID's, then look if there is 1 or 0 next to the ID, thereby indicating whether they should be approved or not. Can someone please help me?? I assume this can be done with an IF statement. I am not familiar with VBA, unfortunately.

It sounds like you need a Vlookup function to lookup the 1 or 0 from your list of IDs. The way a vlookup works is it looks up a certain value (like mechanical turk id) in a range of data and returns any piece of data on the same row as the found match.

As an example, if you had your data in some set of cells, let's say column A had MTurkId, column B had last name, C first name, and so on, and you had your lookup ids and 0 and 1s in the range of cells from T1 to U10 (say a list of 10 ids just for example's sake), you could insert a vlookup in a column to the right of your data (let's say column D in this example). It would look like:

=vlookup(A1, T1:U10, 2, false)

The first parameter is the value you want to look up (the mechanical turk id). The second is the range in which you want to look up the id--the potential matching IDs would have to be in column T--the first column in the range you identify, and column U would have to be your 0 or 1. The 2 tells it you want to return the second column in the range of data, which in this case is the 0 or 1 in column U. The false tells it you want an exact and not an approximate match (I've never found a reason to use the approximate match, so I just always use false here).

If this doesn't make sense, Google the vlookup, and you should find a lot of examples and more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM