Compare All Columns To First And Update

Jun 3, 2008

I receive hundreds of excels which I combine into one sheet for input into a program (which I don't know much about). The combined sheet contains 2 columns repeated with different information. For instance Column A is Category, Column B is Dollar Amount, Column C is Category,
Column D is Dollar Amount and so on.

I then start with Column A and compare it to Column C to make sure the categories match. If C is a new category (not listed in Column A) I shift columns A and B down one and add the new category to Column A. This updates my master list in column A but also maintain the format and correct dollar amount that was listed in Column B. Then I move to Column E and compare it to A using the same logic.

I repeat this process throughout hundreds of columns. I then delete all the category columns and am left with Column A as a master category list and all the dollar amounts in the correct location for all excels that have been sent in. I'm hoping someone here knows a faster way for me to do
this using VB or VBA for Excel or a Macro. I've tried a few things I've found on these forums to no avail, and I'm not an expert when it comes to this. This currently takes me days to complete, and I know it should not take this long. Please save my sanity!

View 9 Replies


Compare Columns In Two Workbooks & Update One

Dec 15, 2007

I have two workbooks, one is reference (W1), other is the one that needs update(W2). I need macro that compares reference column in W1 with targeting column in W2, then for match cells update two or more cells in same with new data from reference cells in W1, and for end to report what data in W1 in reference column wasnt find in W2. I tend to use macro in reference book W1, and to update book W2 without opening, so I need this macro to work just with file manager from excel . No need for user modul for targeting columns, they are static in both woorkbooks. In practise in W1 is invoice prices with part numbers, at other one is the same, but with prices for distribution (with formulas), I want ti automaticly refresh part numbers with new prices, an to have report what part numbers are not in price list (W2)

View 2 Replies View Related

VBA To Compare Worksheets; Update Certain Columns If A Match; Add New Row If Not

Jun 17, 2008

I would like a macro that can match column A & column B data of Worksheet(WeeklyJob) to column A & column B of Worksheet(Master) then if match is found copy column C through column F into Worksheet(Master) column C through F (and overwrite any [outdated] existing data there may be in those columns [thus updating the job's weekly charges, etc.]).
If match is not found I would like it to copy entire row from Worksheet(WeeklyJobs) into first blank row at end of Worksheet(Master) (thus giving me a new record of a new job from the weekly report).

All the columns in both worksheets are labeled the same (& row 1 is headings).

View 9 Replies View Related

Compare 2 Worksheets & Update Differences

Jun 7, 2008

We have a tariff table with the following data per row: Area code - Destination name - Price - and some other stuff that is not important. Once or twice a month we receive updates on Price for some destinations and maybe even some new rows with area codes and destination names that we do not have in our table. Can someone help me with a macro that will look into two sheets and do 2 operations:

1) taking as reference the Sheet2 - Column C (Price Tag) will update column C in Sheet1, using the Area Code (Column A) of both sheets as identifier to find to what row will apply the change;

2) if there is a new Area Code - Destination - etc. row that is not present in sheet1, will add it to sheet1

It does not matter to me if will update directly sheet1 or it will write the entire sheet1 content with the updates to Sheet3.

I am attaching a small example of of the sheets.

View 5 Replies View Related

Data Compare And Update Based On Condition

Jan 29, 2009

I have a spreadsheet with ~35k rows of data. This isn't too easy to explain I have the following data (example).

User Name Employee ID Data Level Jan 08 Feb 08 March 08 etc.
Jo Bloggs 12345 A1 1 1 0
Jo Bloggs 12345 A2 1 1 0
Mark Jones 89101 A1 1 1
Mark Jones 89101 A2 0 1

For each user with data level A1 I wish to add an X if the same user has a corresponding data level of A2 so the result should be,

User Name Employee ID Data Level Jan 08 Feb 08 March 08 etc.
Jo Bloggs 12345 A1 X X 0
Jo Bloggs 12345 A2 1 1 0
Mark Jones 89101 A1 1 X
Mark Jones 89101 A2 0 1

I would really love a formula or macro to be in existance that would save me from trawling through all this data and going blind.

View 9 Replies View Related

Compare And Update Selected Data On Two Sheets

Feb 7, 2007

Each monday i get a new price list from our supplier. My job is to compare this list with ours and update if neccesary. The reason, why I'm writing here is simple -I need to automate the process. Since their and our pricelist is somewhat different, it's only possible to use selection comparison. So, I need something that can do this:

1. First I open those two files and make a selection on both of them (like all the apples on the supplier list and all the apples on our list)
2. Push a button that executes a code
3. The code compares a value in the first column
4. If it finds a match, compares the data in second column
5. If data is same, color the cell (or the text) lets say yellow
6. If data is different, update field in our pricelist and color the cell (lets say red), so I can find and recheck it later
7. If the supplier has a _new_ product, the code will insert it somewhere in our list. Doesn't matter where, it may as well be a new sheet
8. Compare the next cells in selected area

View 2 Replies View Related

Compare Two Sheets And Update Prices Based On Item Code?

Jul 16, 2014

I have a price list from my supplier with the new prices.

I then have my Accounting software where I need to update the cost and retail prices. The problem I have is the Accounting software has allocated it`s own Unique ID for each item. So in order for me to bulk import this I need to keep this unique ID with the Actual Product ID together otherwise it will duplicate the product.

Here is a example

Sheet to be updated (Cost and Retail only) from PRICE LIST SHEET
Uneque ID


View 1 Replies View Related

Counting Formula (compare Values In 2 Separate Columns To See How Many Times The Same Value Appears In Both Columns)

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

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

Macro To Compare Columns A & B And Dispaly Any Duplicates In Columns C & D

Feb 21, 2009

what I'm after is a macro to check the contents of Column 'A' against column 'B' and display any duplicates in Columns 'C' & 'D'.

N.B. The headings of Columns C & D are :-

C = Value Found in Column A

D = Value Found in Column B

Any duplicate entries logged in columns C & D should be listed in C2,C3,C4....C20 and D2,D3,D4......D20 etc (in effect creating two new lists)

View 5 Replies View Related

Compare Different Columns Based On One Columns

Jul 30, 2014


Fist I want to compare ColB=ColH, if TRUE, compare colA=colG, if TRUE, again compare colC=colI, IF all this conditions true, then give (colD-colJ) on colL.

all the unmatched rows in 2 tables to populate with different for each table

View 4 Replies View Related

Compare Two Set Of Columns?

Jul 26, 2013

I need to compare add Column A&B in sheet1 and column A&B in sheet two and compare the two result for the difference(like vlookup).

formula to merge two cells in two sheet and compare.

View 3 Replies View Related

How To Compare 2 Columns

Apr 18, 2007

i've check the other threads on how to compare two columns but for some reason it is still not working for me.

I have 2 columns. Column A is the master column and column B is the comparing list. If the company that is listed in Column B (Anywhere in column B) matches exactly with the company name in column A, I would like it to say "check" in column C.

View 9 Replies View Related

Compare Columns

Jan 23, 2009

I have two diffrent sets of columns of data on a spreadsheet one column set is A,B the other is D,E I want a formula or makro that will check columns A,B and compare it to D,E and if it finds a match will paste it in G,H is that possible and how would I do this?

View 9 Replies View Related

Compare Value In Columns

Dec 12, 2006

I have two worksheets but have a same column named "Admin No.". I will need to compare the 2 "admin no." column.


Worksheet 1
Admin No.Name
5555Ting Ting

Worksheet 2

Admin No.Name
5555Ting Ting

I will ike to compare both "admin no." column and when worksheet 1 5555 can be find in worksheet 2, it will return True. 6666 cannot find in worksheet 2 then it will return false.

View 4 Replies View Related

Matching Columns To Update Cell

Jul 18, 2013

I want to update a cell when 1 column matches another column.

this is my data

IDtemp1 temp2ID2 NetinvNetWrit
1$0.00 $19,745.933$1,907.60$29,495.27
2 8$0.00$60,099.38
3$1,907.60 $29,495.271$0.00$19,745.93
4 6$0.00$31,233.28

I want column B and C to populate with E and F if ID = ID2 or column A = Column D

View 3 Replies View Related

How To Compare Columns To Get Minimum Value

Apr 14, 2014

I have numeric value in columns B, D, F, H.

I want to compare the values of these four cells in each row and update columns M (with the minimum value) and N (with the column of minimum value).

How can I manage this comparison?

View 2 Replies View Related

Compare Two Columns And Result In The Third?

Apr 30, 2014

I need to compare two columns A and B with a result in column E. BUT I don't want the result to be added together. ( since it's receipt numbers ) SO my formula is incorrect I need a formula that will show the receipt numbers next to each other divided by a comma or forward slash...

View 7 Replies View Related

Compare Columns Of Data

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

Compare Across Multiple Columns

Mar 3, 2009

I can find lots of ways to compare two lists with single columns, but I need a very basic guide to comparing multiple ones across two sets of data and then highlighting or extracting the unique records. I would prefer to keep the data in the existing columns for later sorting and other purposes.

I currently have the two datasets as two separate worksheets in an Excel 2003 file. The two datasets consist of the same three columns containing strings of text, but there is quite a difference in the number of rows. Dataset One is c. 3550 records, Dataset 2 is c. 1600. There are no duplicate records within each dataset, but there are duplications across the datasets and the records are in a different order, so it's not a matter of comparing Row 1 to Row 1 and so on. The data look a bit like this (semi-colons to show columns):

PM;Smith;Mary Anne
PM;Jones;Fred Henry
PD;Wilson;Peter John
PG;Green;William Laurence

View 2 Replies View Related

Vlookup - Compare Two Columns

Oct 26, 2009

I need a Vlookup to look at two columns when searching. here is an example:

Sheet 1 is my report grid to hand out to the employees, A1 has a drop-down list with my employees names and A2 one for the month, when you click an employee name the vlookup formula fills in the information from sheet 2 (data sheet).

Sheet 2 has data like: Col 1= Month, col 2=employee L-name, col 3= production etc...

currently the vlookup formula messes up because the employee name is in there multiple times because of the months column, i have to delete all months except the one i need. formula is: =vlookup(A1,'sheet2'!,B:C,2,false)

this formula will pull the data in sheet two column 3 (production) for the employee that matches.

how can i make it compare first to col 1 (month) and then col 2 (employee).

View 10 Replies View Related

Compare Columns A And B And Insert Value In C?

Dec 11, 2012

I want to compare Columns A and B and Insert value in C.

So if Column A is null, then place value of column B in C, otherwise place Value of A in C.

View 6 Replies View Related

Compare Columns In Two Different Workbooks

Aug 22, 2013

I want to compare two Excel workbooks which have multiple columns and identify the rows only if all the valves match in both the workbooks, i am attaching a file to understand better.

View 3 Replies View Related

Compare Numbers In Two Columns?

Sep 13, 2013

I have two columns that each contain about 100 serial numbers. Most of the serial numbers shoud be in both columns. How to I determine if there is a serial number that is only in one of the columns and not in the other?

View 4 Replies View Related

Compare More Than Two Columns With Names

Mar 6, 2014

I want to compare many columns and find duplication in the last one;


Column A Column B Column C Column D Column E
1234 1234 1 A OK
1235 1235 1 A OK
1236 1236 3 A OK
1237 1236 0 A OK
1238 1236 1 B Duplication found in different column
1239 1238 0 A OK

To get Column "C" which is calculate how many numbers in that row are repeated with respect to Column "B", I solve it by using : =COUNTIF(B:B,A2) ;

But I want to get a result of duplication in "Column E" by see if "Column B" + "Column D" has the same value regardless of number then say "OK", but if it is not than the before, then write "Duplication found in different column".

View 4 Replies View Related

Compare Columns Between Two Sheets

Apr 30, 2009

The code below compares values on sheet 4 column A to sheet 3 column A and then colors a cell "Green" (Temporary), later I will place data from sheet 4 into sheet 3.

I dont know why but when it finds data on sheet 4 that is not 100% numeric it errors out.

Run-time error '91'
Object variable or With block variable not set.

The data in sheet 4 column A is primarily numeric, there are and always will be some numeric/alpha strings.
I can change the value of sheet 4 A2 to "123x" from "123" and the code stops as described. Leaving sheet 4 A1 as 100% numeric, which works fine.

View 4 Replies View Related

Compare Columns Within A Range

Sep 22, 2008

i'm trying to do some analyzing on an excel sheet and was seeing if there was a function that I could use to speed this up.

So in the file...
I want to Group what's in Column A So the 1's together and the 2's together... Once that is selected I want to know what the largest number in Column C is...

So if the function can select 1 in column A then tell me that 10 is the biggest number in Column C....

View 14 Replies View Related

Compare Unequal Columns?

Dec 13, 2011

I'm trying to compare the 1st 7 days average this year vs the 1st 7 days average last year. How do I write the formula?

Last YearThis Year
852,865 417,290
345,981 702,816
850,560 189,808
335,285 691,152
572,165 283,036
842,145 404,916
735,364 528,332

View 4 Replies View Related

Compare Two Columns In Different Workbooks

Feb 15, 2012

I would like to have a macro or a function, which could compare two "A" columns in different workbooks. macro should run from the first one wb, which gonna have less data in a column than wb2. so, if, let's say, A3 in wb1 differs from A3 in wb2, an empty row should be added in wb1, and now we would jump and compare A4 in wb1 with A4 in wb2 and so on..

View 2 Replies View Related

Date Compare In Two Columns

Mar 11, 2012

I have problem comparing dates in two columns. In these columns, with dates, there can be instead of date letter "X". When I try to compare dates I don't get good results. I have to see that date in column P has been before date in column Q (example 22.02.2012 (P), 23.02.2012(Q), OK).

Sub test()
For Each oneCell In Range("Q2:Q60001")
Select Case oneCell.Value
Case Is "X"
If oneCell.Offset(0, -1) "X" Then

[Code] ........

View 4 Replies View Related

Compare 2 Lists - 6 Columns

Mar 20, 2012

I need to compare 2 lists (each list has 3 columns [first name, last name and email address).

I am trying to compare columns A(incl. First name), B(incl. Last name) and C(incl. email address) to columns D, E and F.

D, E, and F are also First name, Last name and e-mail address respectively.

I need to compare A, B, and C to D, E, and F and find duplicates and highlight them.

View 1 Replies View Related

Copyrights 2005-15, All rights reserved