Qry to compare two columns

nancybrown

Well-known Member
Joined
Apr 7, 2005
Messages
868
Does anyone know a query that will compare 2008 pay terms to 2009 pay terms. Table example is below:

2008 Terms
Net 30 Days
Net 45 Days
1%
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Buck,

Your example really doesn't help to explain what you have and are trying to do. Can you expand upon your example some, showing us a sample of your data AND your expected output?
 
Upvote 0
To simplify this, instead of using two tables for comparison, I've created a query to bring in 2008 Terms, so now I will be working in one query to compare columns of 2008 Terms against 2009 Terms to get the necessary results below.

qryAllTerms
Field: 2008Terms - could consist of terms: Net 30 Days, Net 60 Days, 1% 10, Net 30, Net Cash, etc.

qryAllTerms
Field: 2009Terms - could contain the same terms as tbl2008Terms.

My goal is to be able to compare field 2009Terms against field 2008Terms to see if terms have changed. I need to show change in terms for 2009, e.g., 2008Terms for ABC company were Net 30 Days, but now for 2009 they have been extended to Net 60 Days.

I would need results to return as "Extended" if there is an extended term in 2009, e.g., Net 30 to Net 60, or if we lost terms, e.g., 2008 was Net 30, but 2009 is now Net 15 Days.

Results should return to a field called "Terms Status" as either "Increased Terms" or "Extended Terms"

Hope I explained it a little better.

Thank you.
 
Last edited:
Upvote 0
OK, you know how to link you two tables together. To look for differences in certain fields, all you have to do is the following. Let's say that you are looking for changes in the "Net 30 Days" field. Then add the "Net 30 Days" field from the "2008terms" table to the fields you are returning in the query. Then under the Criteria for this field, enter:
Code:
 <>[2009terms]![Net 30 Days]

Repeat this for all the other fields you want to compare in this query. Note that you want to put the Criteria for each field on a separate (DIFFERENT) Criteria row. If you put all the criteria on the same row, it is treated as AND, if you put it on different row, it is treated as OR.
 
Upvote 0

Forum statistics

Threads
1,214,858
Messages
6,121,960
Members
449,057
Latest member
FreeCricketId

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top