# Matching Data In 2 Columns To Return 1.

Feb 19, 2008

I'm working on a excel sheet to compare data of 2 columns. One column (or array), let's say C3:C13 contains "x" in some of its cells. The other column, let's say P3:P13, contains "d" in some of its cell. What I would like to do is compare the cells of the same row, see if they contain any data and return 1.

So if C3 contains an "x" and P3 contains a "d", therefore it returns 1. If C4 doesn't have an "x" and P4 has a "d", it will return a 0.

The closest I can get to this is the following formula

=SUM(IF(AND(C3="x",P3="d"),1,0), IF(AND(C4="x",P4="d"),1,0), IF(AND(C5="x",P5="d"),1,0), IF(AND(C6="x",P6="d"),1,0)), IF(AND(C7="x",P7="d"),1,0)), IF(AND(C8="x",P9="d"),1,0)), IF(AND(C6="x",P6="d"),1,0))...

However, this formula is way too long. Is there another way of writting or simplifying this formula?

## Matching Two Columns To Return One Value

Mar 7, 2014

Alright, so I need data in column A(Last names) and data in column B(First name) to match their respective names on another sheet. When a match is made, it will return column C(Hours worked).

I originally used Vlookup to match last names, something akin to =VLOOKUP(A:A,Week1!A:P,4,FALSE)

But this does not account for employees that may have the same last names. Is there a way to combine two vlookup's? Or is Index a possible solution?

## Return Value In Third Column If Values In First Two Columns Matching?

Mar 20, 2014

I have a two different workbooks book 1 and book 2 with some data.

If values of first two columns ( Column A and B) of both workbooks are matching then I want a formula that can return the value of third column (column c) of book 2 in book 1 column c.

example:

Book 1

column A / Column B / Column C

100 / 200 /

Book 2

Column A / Column B / Column C

100 / 200 / 300

now I want a formula that can return in column C of book 1 to display 300.

And the data runs across some 100 rows in both workbooks.

## Compare Columns In Worksheet And Return Row Value For Matching ID

Jul 17, 2013

I have used the merge facility to incoporate all the worksheets into one excel files. As they all have same heading, I have sorted the data, first by their account expiry time (oldest to newest) and then by manager (A-Z)

For example, system report generated on 15/03/2013, 28/03/2013, 03/04/2013, 15/05/2013, 28/05/2013 and so on and these are sheet names too. What I want is one worksheet called report with the same heading as my merged worksheets and return values where Column C in 28/03/2013 is compared to 15/03/2013 and if the employee ID matches than return the whole row of data for the report.

the next query would then be for finding employee ID in 03/04/2013 and comparing it with 28/03/2013 worksheet and returning the matched ID in report worksheet.

This is the layout of the report worksheet.

Display NameEmployee IDAccount StatusE-mailDepartmentManagerComment
15/03/2013 to 28/03/2013
28/03/2013 to 03/04/2013
03/04/2013 to 15/05/2013
15/05/2013 to 28/05/2013

so for the above report worksheet, if employee id matches the two compared worksheet (15/03/2013 to 28/03/2013) return all value (Display name, employee id, account status, email, department, manager, comment) from the 28/03/2013 and so on.

## Loop Through Rows And Return Matching Columns

Jan 9, 2009

I have a worksheet with 2 columns. The first column contains names and the second column contains numbers associated with the name.

How can I specify a name, go through the sheet to find all the occurances of that name and then paste all the numbers associated with that name in another worksheet in a set position.

## Lookup Across Columns & Return Matching Detail

Feb 26, 2008

I am trying to track a score. A master capacity sheet has two columns with identifiers (upstream and downstream nodes) relative to a pipe segment. I have a separate sheet (condition sheet) with the corresponding scores. I want to enter the upstream and downstream node numbers in 2 columns (A & B) in the master capacity sheet, and based on the the upstream and downstream node numbers, have the corresponding score (from the condition sheet) on that row copied in the master capacity sheet.

## Return ALL Matching Data From Table

Aug 13, 2008

I'm trying to create a function in VBA,

I have a table of data and need to create a function which requires value (string), range and column number. This will then look for the value within the range and return the data for every match of specified value within the table.

I'm happy for the return value to be in the form:

val1;val2;val3;val4;...;val[n]

## Lookup/Return Non-Matching Data In Worksheets

Sep 14, 2006

I'm trying to compare 3 different worksheet in the same workbook and copying the unmatched values into a new worksheet. find the attached file. In the sample file, am comparing sheet1, sheet2 and sheet 3 with sheet1 as the base. the columns mite differ in their location but the column headers are same.. The difference, bolded cell, should be copied along with the header and the code, into a new file and has to be saved...

## Matching Data From 2 Columns

Dec 21, 2005

I have 2 columns of data. Both should ultimately have identical data,
but both have extranious data I need to separate. These lists will be
300+ long, so by hand is taking forever. Example:
Column A Column B
12345 12344
12346 12345
12347 12346
12348 12347
12349 12349

I need a way to extract the 12344 from column B since it is not in A,
and 12348 from A since it is not in B. They do not have the same number
of entries.

## Matching Two Columns Of Data

Jan 16, 2010

i am using this spreadsheet to monitor when equipment is being borrowed in the office and want a quick view reference (columns A-C) based on the data entry in columns &G. Please note that htis is an example as the original file is confidential, if someone can answer my query here i will transfer the formula to my actual workbook. In the actual workbook the data entry and quick view will be on different sheets if this makes a difference.

## Matching Data In 2 Columns

Mar 15, 2007

I have 2 columns of text A & C and I want to find any text in C where the entry is matched in A, and then have the text entered into column B next to the match found in column A. As always an example as my explanations are usually poor.

## Comparing 2 Columns Have Similar Data - Extract Matching Data

Apr 18, 2013

So I have this problem in excel with comparing 2 columns.

Basically, I have 2 columns(a &B) that I need to compare with one another and find out the matching data. I am trying to use that matching data to enter in our reports.

Both columns might have duplicate items because I am dealing with premium numbers.

Formula to compare these 2 columns and find the matching data and extract it to a separate column. Keep in mind, i am dealing with almost 20,000 lines of data.

## Matching Then Aligning Data Across Rows And Down Columns

Dec 22, 2008

I have what I believe to be a simple problem, but for the life of me, i can't seem to figure it out.

I have a list companies in column A that have a corresponding revenue number in column B.

In column C, I have ANOTHER list of companies and their corresponding revenue number in column D.

Example:...

## VBA Compare Two Columns And Copy Matching Data

Feb 18, 2014

I'm using the code below to compare columns on two sheets (1 column for each) and where there is a match, copy data from the 'Source' to 'Destination' sheet.

[Code] ...........

The code works fine, but I'd like to amend this, but I'm a little unsure about how to proceed.

The script currently compares column C on the 'Source' sheet with column D on the 'Destination' sheet and where a match is found copy column G from the 'Source' sheet and pastes this to column O on the 'Destination' sheet.

I'd still like to copy and paste the same columns, but I'd like to compare two columns from each sheet, so from the 'Source' sheet compare columns C and E to columns D and J on the 'Destination' sheet.

## Show Only Data Related To Matching 2 Columns

Dec 1, 2008

I am trying to do a multiple compare.

First I have a table that has these headings with data..

Name, Level, Req1, Req2, Req3, Req4
Bob, 2, 423, 506, 649, 798
Fred, 4, 601, 799, 1023, 1547

In another section I have..

name Drop down, level drop down. with the 4 Req.

Basically, when you select Fred and 4, I want to to display 601, 799, 1023, and 1547 in the columns to the left of where you do the selection. (which is not in the same place as that table at the top of this question.

## Finding Matching Data From Multiple Columns In 2 Different Excel Files?

Sep 27, 2013

I need to find if there are matching addresses in 2 different excel files. If the same address appears in both files, I would like the new worksheet to return the address along with the sale price from the 1 file and the rental amount from the other file.

I have tried using vlookup but the problem is the exported data file contains the street number in one column and the street name on another column. I have attached a truncated example of both the rental data and the residential sales data.

## Match Data From 2 Columns And Then Return Value From A 3rd One

Oct 4, 2008

1. i am comparing text
2. i have >100 countries, and with vlookup i have to type every single one, and this is what i want to escape (mb i need to refer to an array, or string, or no idea)
3. mb a solution could be sth with index, or match, i just tried it, copying some similar formula from www, but it didn't match the countries, and return the value respective for that country.

E.g. I have China in col1 (1st file), #employees 10 in col2 (1st file), and China in Col 1 in 2nd file. So, a formula should match China & China from both files, and return 10 as number of employees.

## Two Columns Have Data Is Not Similar Then Return The Value

Jun 13, 2007

I need a formula that looks at 2 columns and if the data is not similar to return the value.
For example
Column A
joe Bloggs

Column B
Bloggs, joe

Column C
if value in column B is not similar to column A to return value of column B

## Compiling Partially Matching Data Into Matching Rows With Macro

Jan 20, 2013

My task is to combine two large databases into one spreadsheet by extending the number of columns. The data from each database is 90% matching based on an identification number, however occasionally there are additional rows or unmatched identification numbers that need to be kept for analysis.

When this happens, there needs to be a blank row inserted to represent the missing data in the rest of the corresponding row.

I am having trouble finding a quick way to do this because I have approximately 12,000 rows (and columns up to DV when combined).

for example:

p1
data
data
data
data
p2
data
data
data
data

[Code] .....

needs to become:

p1
data
data
data
data

[Code] .....

I am guessing I will need a macro of sorts, So far I have made one column that tell me if the ID's are matching or not (1 or 0) and if they are not matching (0) I manually insert the rest of the row that is missing or make space for the duplicate data (which needs to remain).

## Creating A Dropdown List Using Matching Data From 2 Columns To Populate The List

Jun 11, 2013

I'm creating a spreadsheet to keep track of my costs of production in an online game. Within the game there are a range of spawned resources that appear for only a short time before being unobtainable these resources have specific types that is shared between multiple spawns of the resource but each resource spawn has a unique name.

My first worksheet lists all the resources and their various qualities and the later worksheets are meant to allow me to choose from a list resources matching the requirements of the item I'm looking to craft. The example i have shown in the second picture requires Tatooinian Fiberplast and Lokian Wild Wheat to craft so in the Chosen Resource column I would like to have a drop down list allowing me to select the named resource type i would like to use - for Tatooinian Fiberplast the only thing on the list should be Omnitwixi and for the Wild Wheat it should show Fizi and Krad

[URL]....

[URL]....

I am aware there are people with more pressing problems than computer games and as such

## Excel 2007 :: Match Data In Two Columns And Return Header

Apr 20, 2012

I have two columns with team abbreviations, one simply says whether they are AL or NL the other is the result of a search with multiple occurrences of the team name. I need to match the long list with the short and put the column header AL or NL in the adjacent cell.

I'm using Excel 2007

The last formula I tried was =INDEX(\$AY\$1,MATCH(BB2,\$AY\$2:\$AY\$15,0),0)

The screen shot actually just part of the sheet copied since the screen shot look like a broken html page Ok I give up. I copy and paste a jpg it turns into code, I copy and paste the spreadsheet and formatting vanishes, I don't have a URL for the picture... I did look at FAQs and didn't find picture rules but I will look again. Meanwhile. . .

It's just six columns of data. The short list is in AY from AY2 : AY15
The long list is in BB from BB2:BB505
The column header "AL" is in AY1 and NL is in AZ1

## Find Data In Column Range & Return Cell Same Row But X Columns To Right

Jun 18, 2008

i have is 3 sheets in the same excel document. Sheet 1 is the mater sheet, which is a compilation of sheets 2 and 3, however the sheet layouts are different.

The sheets consist of a list of names and details. Sheet 1 has all the names in the list, however sheet 2 and 3 only have partial lists that are in a different order from the original list. The details listed next to the names in sheets 2 and 3 are different and hence a straight forward row copy and paste will not work.

What i need is to write a vba script that can take the name from the master list, search sheets 2 and 3 for the name and lookup the variables placed in next to the name, then update the master sheet accordingly, then continue to the next name on the master sheet and do the update again, and so on until all is updated. I have already thought about using lookup functions in excel however there is 1000 names on the list and around 60 details so it would be messy.

## Matching Two Tables - Copying Data For Matching Value?

Feb 27, 2014

I have two tables, Table1 one has only customer codes in it, and I have Table2 with plenty of customer codes and those customer name, surname, age, location...

And I want to match and copy each of those customer codes in Table 1 all the information which is on Table2

Table 1:
50025
50026
50086

Table 2: Considering that name, age and location is each in separate cell

50025JohnSecond25Location 1
60085EmilyThird 20Location 2
45454Wilhelm Fourth35Location 3
10000RoseFifth 60Location 4
50086JohnySixth 45Location 5
65501JacobSeventh18Location 6
50026Jackie Eighth22Location 7

And the outcame should be that it finds the value from Table1 in Table2 and copy's information in Table 1 like this:

50025 JohnSecond25Location 1
50026 Jackie Eighth22Location 7
50086 Johny Sixth 45Location 5

## Copy Matching And Non Matching Data Into New Worksheet

Feb 20, 2014

I have two worksheet "ABX" and "ACX" from which I want to find the matching data for specific columns B, D and E only.

Matching data will be in sheet "Match" and vice versa.

Data are present dynamically.

## Lookup And Return Matching Value

Jul 24, 2009

In column "AT" I have a list of matchups between 2 soccer teams that looks like this

Row 1:Manchester UnitedArsenal
Row 2:Chelsea FCLiverpool
Row 3:TottenhamAston Villa
Row 4:Hull CityLiverpool
Row 5:Everton FCSunderland
Row 6:Bolton WanderersManchester United
Row 7:PortsmouthTottenham
Row 8:Birmingham CityStoke City
Row 9:WiganBlackburn Rovers
Row 10:LiverpoolFulham

In columns "AM" and "AN" I have a rating for the home and away team. So for example, AM row 3 would show the rating of Tottenham and AN row 3 would show the rating of Aston Villa.

Now what I want to do is set things up so that I don't have to enter every teams' rating in manually. I need a formula that would look from bottom to top (row 10 to 1), find the first row that contains Tottenham (for example), and then look to the right to either column AM or AN (depanding on if Tottenham is the first team in the matchup or second) and return the value in that cell.

## Return Value After Matching Two Variables

Dec 10, 2006

I am attaching a sheet wherein I have tried to match two variables and to return the appropriate value. But I find the formula returns the value which one cell below the correct answer.

## Return Matching Name To ID In TextBox

Apr 7, 2008

I have a userform with several textboxes. I am trying to get one of the textboxes to auto populate based on the entry in another textbox. example: I want to enter a customer ID in one box and then the customer name to automatically appear in another box. The customer ID and names are stored in another workbook.

## Return All Matching Occurences

Apr 15, 2008

I'd like to evaluate a series of columns where a value greater than 1 would return all matches in another worksheet. I can't seem to use LOOKUP or Pivot Tables effectively to do this.

For example

## MID FIND LEN (return The Matching Word In V6)

Oct 2, 2008

=MID(M11,FIND(\$V\$6,M11),LEN(\$V\$6))
I use the formula above to return the the matching word in v6, from text within m11. If theres is no match it returns #value. is it possible when theres no match to return "Not Match" in the cell instead

## Matching Combination Of Two Cells With A Table And Return Value

May 8, 2014

As shown in the attachment, I'm trying to return value when matching cell B7 + D5 with cell G5:I7. Is there any way to do so?

Attached File: File Type: xlsx Book1.xlsx‎