{"id":4419,"date":"2021-11-10T11:01:54","date_gmt":"2021-11-10T11:01:54","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=4419"},"modified":"2021-11-10T11:02:15","modified_gmt":"2021-11-10T11:02:15","slug":"vba-to-replace-vlookup","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/office\/vba-to-replace-vlookup\/18067.html","title":{"rendered":"VBA To Replace Vlookup"},"content":{"rendered":"<p>I have a similar case for this one that I searched around (https:\/\/computing.net\/answers\/office\/search-a-field-and-assign-a-label-based-on-results\/17987.html), yet not find a solution.<br \/>\nI have the main spreadsheet with several info collected such as ref #, date, hours, and so on. Then another spreadsheet contains ref # that need to mark as &#8220;good&#8221; in the main spreadsheet.<\/p>\n<p>I could manually add column for status (good\/take a look in the spreadsheet 2), then use Vlookup to function in in the main spreadsheet. However, I would like the VBA code for it to automatically put &#8220;good&#8221; on the ref # in spreadsheet 2 in main spreadsheet and &#8220;take a look&#8221; if the ref # is different from main spreadsheet and spreadsheet 2 (status column are already created).<br \/>\nEx:<br \/>\nMain spreadsheet:<\/p>\n<pre> \r\n    A              B                                  C \r\n1 5964         02\/02\/12             Drop list of \"good\", \"take a look\" .... \r\n2 6588         02\/02\/12                     Good or take a look\r\n3 1285        12\/12\/12                      Good or take a look\r\n<\/pre>\n<p>Spreadsheet 2:<\/p>\n<pre> \r\n         A                  B\r\n1      1285               Good\r\n2      8562               Good<\/pre>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":2},"question-category":[53],"question_tags":[],"class_list":["post-4419","question","type-question","status-publish","hentry","question-category-office"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/4419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=4419"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=4419"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=4419"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=4419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}