Formula To Compare 2 Columns And Manipulate The Resulting Data And Output
Mar 31, 2007
I have column A and column B:
I will be inputting data into column B.
I need excel to check to see if the data I input into column B is an exact match to the data in column A.
If it is an exact match, then column B will remain blank.
If the data in column B is different, I need column B to show the following:
No match: <data>
Example I input in column B the following:
Column A Column B
1. Car Car
2. 4357 9999
3. fsd34d 4erd
4. 98dkf 98dkf
Spreadsheet should show:
Column A Column B
1. Car
2. 4357 No match: 9999
3. fsd34d No match: 4erd
4. 98dkf
(Cell 1 and 4 in column B are empty because they are exact matches to Column A cell 1 and 4)
My questions:
1) How does the excel formula need to be written for this to work?
2) Is there a way to set it so that when I do a mass copy to data into column B that the formula will not be overwritten and it will still check to see if the data I copy and pasted into that column matches the data next to it in column A?
View 14 Replies
ADVERTISEMENT
Jun 24, 2013
I have a simple spreadsheet of an inventory. Each row on this spreadsheet represents the data related to an item. I would like for a user to be able to INPUT a serial number via a userform. Then, I would like for the program to OUTPUT some information about that particular item (a few cells that should be on the same row as the serial number).
I attached an image diagram that may better represent what I am trying to do.
View 9 Replies
View Related
Feb 6, 2013
I have a worksheet with five columns (A, B, C, D and E)
The cells in Column B contain letters and/or numbers (without spaces) in no particular order.
The cells in Column C contain letters and/or numbers (without spaces) in no particular order.
I want to compare all characters in 1st Cell of Column B with all characters in 1st Cell of Column C, and display the matching characters in 1st Cell of Column D, and the character count of 1st Cell in Column D must be displayed in 1st Cell of Column E. note that multiple instances of the same character must not be treated as duplicates. When execution on 1st Row is finished then repeat procedure for Row 2, etc... Stop execution when first empty cell in Column B is located.
Example:
B1 = LJLM12
C1 = KY2MLK
B2 = ZCG4GM
C2 = X4GGGC
B3 = KTCBNG
C3 = GNBTBB
The script/code/formula must output the following:
D1 = LM2
E1 = 3
D2 = CG4G
E2 = 4
D3 = TBNG
E3 = 4
I am using Excel 2003. Y
View 2 Replies
View Related
Feb 4, 2013
I'm trying to compile a VBA that would allow me to compare 2 columns "A" in different worksheets (same Workbook) and output any unique values to 3rd worksheet together with the rest of the values in the corresponding row.
Sheet1
A
B
C
[Code]....
Excel 2010
View 9 Replies
View Related
Jan 21, 2010
I know that I an probably asking for too much but I must get the formula some way. OK, I need a formula for this:
lets say I have 3 columns (A,B,C (search criteria). In each Column there is a DIFFERENT number. There is 3 more columns (D,E,F (used to compare).Each column has 3 Different numbers. If 3 numbers match between the two sets of 3 numbers I want Column G to display "CCC". IF 2 numbers match I want G to display "CCH". If 1 number is a match I want G to display "HHC". If none of the numbers match I want G to display "HHH".
I can manually do these but it will take waaaay toooooooooo much time to do. If you can do this for me it would be a great help indeed because I'm trying to do other states. With this formula I can use Automate to do a large quantity of numbers.
View 14 Replies
View Related
Oct 13, 2008
I'm trying to compare values in 2 separate columns to see how many times the same value appears in both columns. Ideally I would be able to insert a range function to compare the values in the column "ID 1" against the values in column "ID 2" and return the count of times that a value appears in both columns. For example 2122, 1112 and 1718 appear in both columns and I would like the formula to return a count of 3.
ID 1ID 2
12342122
45671112
89101718
11122678
13144544
15162324
17189987
19201215
21221928
1976
2576
2345
4678
In my actual project I'm comparing 2 columns in the same worksheet. The column are column B with data in cells B2:B10266 against column C with data in cells C2:C18560.
View 4 Replies
View Related
Apr 4, 2013
This is a very SMALL sample of the data I need to sort through. We have been using filters but the data is growning and becoming far too time consuming using the filter method.
The output I am looking to achieve is something like this, (any format is fine; whether in rows or columns)
SVR1
1.99.99.254
(2) CAT I (display how many CAT I for SVR1)
CAT I: 2011-B-44
CAT I: ST-5546
(2) CAT II (display how many CAT II for SVR1)
CAT II: 2011-B-52
CAT II: 2011-A-21
SVR2
2.5.2.333
(1) CAT I
CAT I: 2012-E-55
(1) CAT II
CAT II: 2011-A-21
COLUMN A, varies from SVR1-SVR1400 (cointains duplicates)
COLUMN B, IP matches SVR name (contains duplicates)
COLUMN C, will be either CAT I, CAT II, CATIII
COLUMN D, will contain duplicates
I have some history of using formulas and nested formulas but this one is really throwing me for a loop. It feels like Inception to me and I'm not really sure where to start!
A
B
C
D
SVR1
1.99.99.254
[Code] .....
View 9 Replies
View Related
Jun 4, 2006
I am trying to add a formula to a cell but I get this error, #NAME?
Here is the formula: =((pi * (5^2)) / 2) - ((5^2) * ASIN(1 - (A73 / 5))) - ((5 -A73) * SQRT(A73 * ((2 * 5) - A73)))
I'm trying to add it to cell B73,
View 3 Replies
View Related
Dec 16, 2005
how to change a proportion of text in a resulting concatenation
formula.
cell A1 contains the text in bold "ABCDEF", cell A2 containes "GHIJKLM" cell
A3 contains =A1 & " " & A2 but I want the cell A1 part to remain in bold. Is
there a way of using the TEXT function e.g. =TEXT(A1,BOLD) & " " & A2?
View 9 Replies
View Related
Mar 6, 2007
I have data in 2500 rows and 29 columns and need to compare cells in 5 columns if the value is same and make the font of cells that are same color red or make a different cell red if any value is not same.
I did this with a macro but it takes few minutes(3-4).
Now I try to do it with a formula but no idea how. Formula is faster.
View 9 Replies
View Related
Jan 9, 2014
Essentially, I would like a user to be able to select a PUB from the Data Validation drop down in row 2 of the PUB RATES sheet so that the corresponding information in the DATA sheet autofills.
Currently, this works only for the first column under each PUB when selected and this fills across all 4 columns (rather than the respective information for each column filling).
Also, the Data Validation dropdown includes blanks which I would like to exclude.
I have used a Range Name for the Data Validation of each PUB so that these can be drawn from a separate sheet as I don't want all the DATA content on the same sheet as the PUB RATES content.
View 4 Replies
View Related
Jul 17, 2007
I need a macro that will compare two sheets, find the differences and produce a new third sheet called, results. Both sheets to compare will differ in length of values (one may have 10 numbers to compare, and the other could have 50, Ive attached sample data), and thus this calls for a primary and secondary sheet. I would only like the values which appear in the primary and not the secondary sheet to be reported in the new results sheet.
The problem is that the values never match up, but they are always within a +/- 0.5 window of each other. It would be great to compare the two sheets, to produce a list of the values which appear only in the primary sheet and not the secondary. Im trying to get this to link up to a userform, where the user select the primary sheet (A) and the secondary sheet (B), selects the tolerance, and produce the results sheet (see attached).
View 8 Replies
View Related
Jul 18, 2013
for example i have two work books where i need to compare the times, such as i need to see where does 10:26 am lies and after comparing it on workbook2 we need to return the data in a,b,c blocks infornt of 10:26am, i have tried IF(AND()) but i was not able to rationalise it for huge and random data.
Workbook1:
7/13/2013 10:26
7/13/2013 10:58
7/13/2013 12:06
7/13/2013 12:17
7/13/2013 12:29
7/13/2013 12:29
7/13/2013 12:37
7/13/2013 13:21
7/13/2013 14:24
Workbook2:
9:58:27abcassigned
11:45:09abcreleased
11:49:00ghiassigned
15:14:40ghireleased
15:25:57mnoassigned
Outout should be:
7/13/2013 10:26 a bc
7/13/2013 10:58 a bc
7/13/2013 12:06g hi
7/13/2013 12:17g hi
7/13/2013 12:29g hi
7/13/2013 12:29g h i
7/13/2013 12:37ghi
7/13/2013 13:21ghi
7/13/2013 14:24ghi
View 2 Replies
View Related
Apr 9, 2014
creating a macro that would compare two worksheets and their differences would be copied into a third worksheet in the same workbook? Several key criteria is needed:
1) The third worksheet would need to note only the data from the 1st and 2nd worksheets (including headers) that had differences. An additional column would do the difference calculations for the data whereby numeric values are subtracted (worksheet 2 from worksheet 1 values) and non-numeric values would note "Pass" or "Fail".
2) All data values that had differences would be formatted in yellow shading on the third worksheet.
3) The unique ids from column A in worksheet 1 would have to have be noted in column A of the third worksheet; even if they didn't have a difference from worksheet 2.
4) The third worksheet would need to note all of the columns noted in worksheet 1 and include the difference column for each unique column.
5) Flexibility in code to allow for addition of new columns to analysis.
see attached sample spreadsheet whereby Worksheet 1 = "dv file", Worksheet 2 = "price file" and Worksheet 3 = "Error" for purposes of this discussion.
View 9 Replies
View Related
Nov 20, 2008
I am a newbie and need your expert help please.
I have two email lists. For example they are:
List 1:
a@spam.com
b@spam.com
c@spam.com
List 2:
abcdef@spam.com
b@spam.com
c@spam.com
In list 1 the non-matching address is a@spam.com. namely it is not common to both lists. I want to automatically go through the lists and output firstly a new list of the non-matches from column 1 and also a new list of the non-common items from list two.
So in this case the result would be that somewhere there is a new list from list 1 that has "a@spam.com" and secondly there is a new list from list 2 that has "abcdef@spam.com."
Obvioulsy the real list is more complicated and longer but the principle will be the same.
View 10 Replies
View Related
Apr 17, 2013
I have two lists that I have compare to compare.
Expected result: Mark items matched in next to them, output unmatched items in column "J"
I started the code below. It properly marks the correct items, but I have trouble outputting them in Column "J"
Sub BNKREC()
Counter = 0
For i = 3 To 9
For J = 3 To 6
If Cells(i, "B").Value = Cells(J, "F").Value And Cells(i, "C").Value = Cells(J, "G").Value Then
[Code] .....
List 1:
Date Check# Amount
03/02/2013 100 $1,000.00
03/03/2013 101 $1,045.25
03/05/2013 102 $280.56
03/06/2013 103 $456.31
03/08/2013 104 $250.55
03/15/2013 105 $2,456.12
03/25/2013 106 $844.76
List 2:
Date Check# Amount
03/02/2013 100 $1,000.00
03/05/2013 102 $280.56
03/08/2013 104 $250.55
03/25/2013 106 $844.76
Expected result:
Un-Matched List:
03/03/2013 101 $1,045.25
03/06/2013 103 $456.31
03/15/2013 105 $2,456.12
View 5 Replies
View Related
Jan 7, 2008
I am looking for VBA code to solve a current problem. I have a list of numerical (row) values (Column A) that I am sorting the column (by VBA code) in descending order. Column B is the Bin location. These rows are then output to another worksheet (Column 1 shows the amount and Column 2 displays the Bin location and the amount to be shipped from each Bin). After each output, the original (A & B) columns are re-sorted.
If
Column A = 27
Column B = Bin1
Then
[TABLE]27Bin1;[/TABLE]
The Output should be
Column 1 = 27
Column 2 = Bin1 27;
written as
[TABLE]27Bin1 27;[/TABLE]....................
View 3 Replies
View Related
Feb 19, 2009
I need a macro to compare the values in column b across 2 sheets and output the rows that do not have duplicate values in column b to a third sheet?
View 3 Replies
View Related
Oct 28, 2013
I have a long chain of formulas calculating the return on a particular investment in equipment. We'll call the inputs A, B, and C, and the output (total savings generated) Z. There are several set combinations of values for A, B, and C that I'm interested in generating a summary report for.
There are a number of steps in-between the inputs that I'm interested in, all of which are necessary to get to the output, but is there a good way to have excel chart inputs and outputs without filling out the intervening data?
I suppose the whole thing is essentially a multi-variable, multi-step data table.
View 3 Replies
View Related
Feb 28, 2008
I am working on project of doing Turn around time Analysis of the volumes of work recieved before 12:30PM and after over a weeks time. My data consist of Work ref, Datein, Dateout, Timein, Timeout. To carry this analysis I have to Mannually filer the data as per Datein / Timein and Dateout and then count the no of work ref completed within Same day or one day or more than one day for each date of a given week. I recorded a Macro which gives count of no of work. for one particular date of week and repeated the same for each 5 working dates of given week. this Macro has gone to big and I want to use some looping technique which would change my filtering criteria. I tried doing this by assining a variable to Criteria but Macro gives no values.
Range("A1").Select
Selection.AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=2, Criteria1:="=04/02/08", Operator:=xlAnd
Range("E1").Select
Selection.AutoFilter Field:=5, Criteria1:="<=12:30", Operator:=xlAnd
Range("IV1").Value = "=SUBTOTAL(9,H2:H272)"
Selection.AutoFilter Field:=9, Criteria1:="=L*", Operator:=xlAnd
ActiveSheet.Calculate
Range("sheet1!B3").Value = Range("IV1").Value
Selection.AutoFilter Field:=9, Criteria1:="=S*", Operator:=xlAnd
ActiveSheet.Calculate
Range("sheet1!B4").Value = Range("IV1").Value
I want to repeate the above code for different dates of week 04/02/2008 to 08/02/2008. How to change Criteria using Loopin technique.
View 2 Replies
View Related
Jan 26, 2009
I have column A with 228 rows and column D with 314 rows. Both columns have the same data except that D has different data. I would like to line up everything that is the same in A and D and everything else in column D that is not the same move to G. Is there a quick way to do this?
View 5 Replies
View Related
Jul 10, 2008
i want to compare data between 4 columns, 2 columns of data is in Sheet 1 and 2 columns of data is in sheet2. Data starts at A5 in both worksheets. Data consists of stock codes and there holdings. Sheet 1 data is real data the primary source, sheet 2 data is a bit of real data and incorrect data.
My data in sheet 1 is layed out as below, this is just a sample, real data has around 1500 stock codes and holdings.
Starting at A5
Col A (Stock) Col B (Holdings)
5 aap 10500
6 aax 10987
7 aas 76544
Sheet 2 data is layed out as above but holdings may differ, so
Col A(Stock) Col B (Holdings)
5 aap 10500
6 aax 10300
7 aas 76534
I need a formula which will tell me which stocks holdings have changed in sheet 2 compared to sheet1.
View 9 Replies
View Related
Dec 29, 2009
I'm working with Excel 2007, I have two tabs on my spreadsheet, each tab contains a column of numbers formatted like 5552220. Is there a way to run a macro or write a formula that would compare the data between the two columns and either automatically delete the numbers that don't have a match or highlight them? For example:
Tab A Tab B
5551112 5551112
6660001 6660001
1234567 1234567
2222222 2222222
6666445
6666445 needs to be deleted in tab B because it's not present in tab A. There could be up to 100 numbers that require deletion from tab B.
View 9 Replies
View Related
Oct 10, 2006
I have 2 columns say A and B (infinite number of rows)
A is an Indexed number starting at 1
B is numerical data.
I now have a second set of the same columns with the same data, however some rows are missing. I need a way of comparing the data and then display the rows I am missing in the second set of columns.
For example the first set will be the master list and look like:
Index Data
1 34
2 46
3 54
4 276
5 311
6 89
Second list has row 2 and row 5 missing.
Index Data
1 34
3 54
4 276
6 89
The desired result is to have the missing rows displayed;
Index Data
2 46
5 311
View 4 Replies
View Related
Feb 9, 2010
I have some sample data in "Sheet1" and another sample data in "Sheet2".
The intended output is shown in "Sheet3".
For example: if "Student1" in Sheet1 match the data for "Student1" in Sheet2, then all the entries for "Student1" in Sheet2 will be copied to Sheet3 (ouput). The same thing goes to other students in the list (Sheet1).
Sheet1 (sample data):
Student1 | Student2 | Student3 | Student4 | Student5
Sheet2 (sample data):
Student2 | Student5 | Student3 | Student4 | Student1
Lesson1 | Lesson1 | Lesson11 | Lesson1 | Lesson1
Lesson8 | Lesson2 | Lesson2 | Lesson23 | Lesson10
Lesson3 | Lesson3 | Lesson31 | Lesson3 | Lesson3
Lesson10 | Lesson4 | Lesson4 | Lesson44 | Lesson4
Lesson5 | Lesson5 | Lesson52 | Lesson5 | Lesson15
Lesson6 | Lesson6 | Lesson6 | Lesson6 | Lesson6
...............Lesson7..................Lesson10 | Lesson7
...............Lesson20.................................Lesson11
Sheet3 (output sample):....................................
View 6 Replies
View Related
Jun 15, 2006
I have a dataset that has replicated Data Values for example "Bob 25" in one row, "Bob 32" in another and so on. This is contained in one data sheet. I want to be able to do something like a VLOOKUP however I want to every instance that the data value occurs to be represented sequentially in my table, so that every instance of "Bob" would be in represented in my table.
View 2 Replies
View Related
Nov 10, 2013
I have 2 sets of data/array/range. Each set consists of 2 columns with a large number of rows.
I want to compare my 2nd data to a master data. And list if anything is different in 2nd set of data from master set in column A than highlight the difference or copy the value to another place.
Also want to compare the 2nd column if column A was same and consider both column A and column B for that associated row different if column B is different.
The trouble for me comes in because the list is never alphabetical (sort doesnt work cause of funky naming) and never of the same size.
Attached is a photo of an example for maybe an clearer understanding. Also attached an example excel sheet I tried it within excel but cant seem to figure out how to look also for the 2nd column, so im trying to avoid the within excel route and go using vba ...
T3OCcxw.jpg
example.xlsx
I attempted it with a very basic code thats not working =/ just cant seem to figure how to code to get the desired result
VB:
Sub matchdiff()
Dim cell As Range
Dim found As Range
[Code].....
View 1 Replies
View Related
Jul 31, 2012
I have 2 worksheets in 2 spreadsheets 1 & 2. I would like to compare columns A & G in 2 to 1. If columns A & G in worksheet 2 matched worksheet 1, then it will fill in columns B, C, D, and AL automatically.
View 1 Replies
View Related
Oct 26, 2012
I'm having difficulties using vlookup to compare two columns of TEXT data. My goal is find out how many of items in the "Eligible Serial Numbers" list have been ordered for destruction. The items listed for destruction are listed in the "Serial Numbers (destroyed).
Whenever I put in a VLOOKUP, I get a serial number that doesn't make sense to me. For example, if I want to find out if "362351581" from the Eligible List appears on the destroyed list. What do you suggest?
Code:
Destroyed? (i.e. Vlookup formula in this column)
Eligible Serial Numbers
Serial Numbers (destroyed)
362351581
362351581
[Code]....
View 9 Replies
View Related
May 9, 2013
I have account numbers in Col A and in Col D .I would like a macro to highlight the color the items in Col D that are not in col D. Blanks can be ignored
View 3 Replies
View Related