Solved

comparing 2 columns

Posted on 2014-09-10
4
73 Views
Last Modified: 2014-09-25
I have got a set of data returned from a query – exported to excel. I have 2 rows of data I need to “compare”, they are called invoice_num and invoice_ID. If a unique invoice_num appears in 20 consecutive rows – there should also be a unique invoice_ID which should also appear in the same 20 rows.
 i.e.

invoice_num             invoice_id
12345                  34567
12345                  34567
12345                  34567
55555                  99999
55555                  99999
12348                  50006
12348                  50006


As it stands invoice_num is in column A and invoice_ID is in column B. I presume an additioanl column i.e. Z that has some sort of summary would be fine. An exception would be if you have unique invoice_num but different invoice_ID on different rows, and vice versa.
0
Comment
Question by:pma111
4 Comments
 
LVL 21

Expert Comment

by:Randy Poole
Comment Utility
Not quite sure what you are asking for here. Can you give an example
0
 
LVL 48

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 167 total points
Comment Utility
Hi,

pls try

=IF(SUM(IF(FREQUENCY(($A$2:$A$8=A2)*($B$2:$B$8),($A$2:$A$8=A2)*($B$2:$B$8))>0,1))-2+SUM(IF(FREQUENCY(($B$2:$B$8=B2)*($A$2:$A$8),($B$2:$B$8=B2)*($A$2:$A$8))>0,1))-2,"Not OK","OK")

Regards
EE20140910.xlsx
0
 
LVL 31

Accepted Solution

by:
Rob Henson earned 167 total points
Comment Utility
Assuming data in columns A & B, the following formula in column C will give blank for first occurence of Invoice or TRUE or FALSE depending whether the Invoice ID matches the first occurence:

=IFERROR(B2=VLOOKUP(A2,$A$1:B1,2,FALSE),"")

Copy into C2 and then copy down. The lookup range will extend as you copy down. You can then filter for FALSE to get those that don't match.

Thanks
Rob H
0
 
LVL 7

Assisted Solution

by:tomfarrar
tomfarrar earned 166 total points
Comment Utility
If this is an ongoing requirement you could make a table out of the two columns and create two linked pivot tables, one with column A left-most row and one with column B left-most row ( in traditional pivot table format) and the abnormal combinations will visually stand out.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now