83246

Compare two column from different sheet and return numeric value on third

Question:

I want to compare sheet 2 column "A" with sheet 1 column "A" (which contains text value ex:name). If do match return 1, if not return 2 on sheet 2 column "B".

Answer1:

Use below function in sheet2: column B

=IF(Sheet1!A1=A1, 1, 2) =IF(Sheet1!A2=A2, 1, 2) . .

You should get desired output. See screen-shots as asked :

<img alt="Step 1" class="b-lazy" data-src="https://i.stack.imgur.com/LTykb.png" data-original="https://i.stack.imgur.com/LTykb.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<img alt="Step 2" class="b-lazy" data-src="https://i.stack.imgur.com/rev1Z.png" data-original="https://i.stack.imgur.com/rev1Z.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

<img alt="Outcome" class="b-lazy" data-src="https://i.stack.imgur.com/mPBNu.png" data-original="https://i.stack.imgur.com/mPBNu.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

Recommend

  • Vlookup in VBA within a for loop
  • Renaming worksheets in Excel via export from Visual Studio 2010
  • Excel Marcro - delete a row based on row number [closed]
  • Getting Application-defined or object-defined error
  • Fixed Background Works in Chrome but Not Firefox?
  • Comparing user's facebook/twitter friends to site's users in Python/Django
  • Responsive Form on top of Responsive Image? - Bootstrap
  • runtime-check whether an instance (Base*) override a parent function (Base::f())
  • How to open html table in xls on click of a button
  • Where can I find tomesh.c?
  • Application level floating views with navigation in Android
  • AndEngine Applying Transparancy to AndEngine View
  • Using a canvas object in a thread to do simple animations - Java
  • Groovy: Unexpected token “:”
  • preg_replace Double Spaces to tab (\\t) at the beginning of a line
  • Replace value with Factor in r data.table
  • Extracting HTML between tags
  • Avoid links criss cross / overlap in d3.js using force layout
  • MongoDB in PHP using aggregate to group by _id is null not working
  • How to access EntityManager inside Entity class in EJB3
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Why HTML5 Canvas with a larger size stretch a drawn line?
  • MySQL WHERE-condition in procedure ignored
  • Deserializing XML into class C#
  • Web-crawler for facebook in python
  • Function pointer “assignment from incompatible pointer type” only when using vararg ellipsis
  • RestKit - RKRequestDelegate does not exist
  • Data Validation Drop Down Box Arrow Disappearing
  • trying to dynamically update Highchart column chart but series undefined
  • python draw pie shapes with colour filled
  • Django query for large number of relationships
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • Binding checkboxes to object values in AngularJs
  • How to Embed XSL into XML
  • How can I use `wmic` in a Windows PE script?
  • java string with new operator and a literal
  • Net Present Value in Excel for Grouped Recurring CF
  • How to push additional view controllers onto NavigationController but keep the TabBar?
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How to load view controller without button in storyboard?