Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2016, 11:01 PM
Asadmir27 Asadmir27 is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 7 64bit Matching the values in two columns A and B and to see if there are common values in both the columns Office 2010 32bit
Novice
Matching the values in two columns A and B and to see if there are common values in both the columns
 
Join Date: Dec 2016
Posts: 5
Asadmir27 is on a distinguished road
Default Matching the values in two columns A and B and to see if there are common values in both the columns

Attached is a worksheet named "Query". In this worksheet there are two columns "A" and "B" containing numbers in both columns. I want to compare values of one column completely with the values of other column and to see whether there are common values in both the columns. If there are any common values I want excel to show those values. For that, I need a formula. Any help would highly be appreciated....


Regards



Asad Iqbal Mir
Asadmir27@yahoo.com
Attached Files
File Type: xlsx Query.xlsx (8.7 KB, 8 views)
Reply With Quote
  #2  
Old 12-13-2016, 12:18 AM
xor xor is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 10 Matching the values in two columns A and B and to see if there are common values in both the columns Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Take a look at the attached.
Attached Files
File Type: xlsx Query_2.xlsx (10.4 KB, 11 views)
Reply With Quote
  #3  
Old 12-13-2016, 12:42 AM
Asadmir27 Asadmir27 is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 7 64bit Matching the values in two columns A and B and to see if there are common values in both the columns Office 2010 32bit
Novice
Matching the values in two columns A and B and to see if there are common values in both the columns
 
Join Date: Dec 2016
Posts: 5
Asadmir27 is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
Take a look at the attached.
Bundle of thanks. Helped alot
Reply With Quote
  #4  
Old 12-13-2016, 01:12 AM
xor xor is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 10 Matching the values in two columns A and B and to see if there are common values in both the columns Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

I forgot to mention that the formula is an array formula meaning that instead of just pressing Enter when finishing the formula you must hold down Ctrl and Shift before pressing Enter: If you do it correct Excel will put braces {} around the formula. Don't try to enter these {} manually.
Reply With Quote
  #5  
Old 12-13-2016, 02:58 AM
Asadmir27 Asadmir27 is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 7 64bit Matching the values in two columns A and B and to see if there are common values in both the columns Office 2010 32bit
Novice
Matching the values in two columns A and B and to see if there are common values in both the columns
 
Join Date: Dec 2016
Posts: 5
Asadmir27 is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
I forgot to mention that the formula is an array formula meaning that instead of just pressing Enter when finishing the formula you must hold down Ctrl and Shift before pressing Enter: If you do it correct Excel will put braces {} around the formula. Don't try to enter
these {} manually.
Thanks. I knew it must be an array formula as we are comparing whole columns. If you please explain the formula briefly step by step in the worksheet with actual formula and send me attachment, it would be much easier to understand. Thanks again.
Reply With Quote
  #6  
Old 12-13-2016, 04:46 AM
xor xor is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 10 Matching the values in two columns A and B and to see if there are common values in both the columns Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

A Christmas present.
Attached Files
File Type: xlsx Query_3.xlsx (13.1 KB, 8 views)
Reply With Quote
  #7  
Old 12-13-2016, 08:53 AM
Asadmir27 Asadmir27 is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 7 64bit Matching the values in two columns A and B and to see if there are common values in both the columns Office 2010 32bit
Novice
Matching the values in two columns A and B and to see if there are common values in both the columns
 
Join Date: Dec 2016
Posts: 5
Asadmir27 is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
A Christmas present.
So so much thanks. Thanks alot for your time.
Reply With Quote
  #8  
Old 12-28-2016, 11:14 PM
Asadmir27 Asadmir27 is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 7 64bit Matching the values in two columns A and B and to see if there are common values in both the columns Office 2010 32bit
Novice
Matching the values in two columns A and B and to see if there are common values in both the columns
 
Join Date: Dec 2016
Posts: 5
Asadmir27 is on a distinguished road
Default need clarification.....

Hope You are fine and healthy...

'=IFERROR(INDEX($A$2:$A$9;SMALL(IF(COUNTIF($B$2:$B$9;$A$2:$A$9)=1;ROW($A$2:$A$9)-CELL("row";$A$2:$A$9)+1);ROWS($1:1)));"")

IN above function, countif function is used. what, if I use COUNTIF FUNCTION AS "COUNTIF($A$2:$A$9;$B$2:$B$9)=1. I checked entering this changed function of countif but results are not correct. why is this, what is the reason. Moreover, you wrote "=1" at the end of countif, does it mean that the values which are common or in other words equal in both columns which is equivalent to "=1", so "=1" means return true if values in two columns are aequal???? please help. Besides, If you guide me to a link or videos or some easy to understand books downloadable online on "Array Formulas" it would be a great help for me. As For now, I am not proficient in array formulas. I've mentioned my e mail address below.Your reply would really be helpful as always.

Stay healthy

Regards

Asad Iqbal
Asadmir27@gmail.com
Asadmir27@yahoo.com
Reply With Quote
  #9  
Old 12-29-2016, 12:06 AM
xor xor is offline Matching the values in two columns A and B and to see if there are common values in both the columns Windows 10 Matching the values in two columns A and B and to see if there are common values in both the columns Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

..... what, if I use COUNTIF FUNCTION AS "COUNTIF($A$2:$A$9;$B$2:$B$9)=1. I checked entering this changed function of countif but results are not correct. why is this, what is the reason .....

I don't know what you mean.

What the "=1" means I actually tried to explain in the uploaded file, Sheet1!F14:F23.

I wrote "Excel array formulas" in Google and got about 246,000 hits in 0.46 seconds.
Reply With Quote
Reply

Tags
common values, matching values, taking out common values

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Matching the values in two columns A and B and to see if there are common values in both the columns Excel / Mail Merge - Return Column Headers for All and Any Columns with Values eduams Mail Merge 1 09-26-2016 07:02 PM
Matching the values in two columns A and B and to see if there are common values in both the columns sum values in columns pero978 Excel 3 01-30-2016 07:49 AM
Formula/function to return column names for matching values GiJoe81 Excel 1 06-27-2015 12:13 AM
Hide rows in multiple columns based on zero values Deane Excel Programming 19 06-23-2015 11:24 PM
Matching the values in two columns A and B and to see if there are common values in both the columns Copying and pasting values with unequal data columns grexcelman Excel Programming 5 12-05-2014 11:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft