Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 33
Default Searching and displaying records that match criteria.

Hello again.

Experience level:
Good to Advanced in both Excel and VBA, i'm just stuck where to start!

I have 2 worksheets: Master Data and Supplier Data

Master Data contains information downloaded from our business warehouse:
Supplier no (key field 1)
Product no (key field 2)
Site no (key field 3)
Current price
Currency
Trading terms

Supplier Data contains pricing info from suppliers
Supplier no (key field 1)
Product no (key field 2)
Site no (key field 3)
Price - revised
Payment terms - revised
Currency
Trading Terms - revised

I want to produce a report based on the following logic:
IF
Supplier Data!Supplier no + Product no + Site no are found in Master Data,
THEN
compare based on price, terms (+ other criteria)
THEN
copy changes to 'Changes Report' worksheet.
(fields Supplier no, Product no, Site no, Old price, New price, Old terms, %
change, new terms)

The result would be a report that shows all the line items that have changed.

If more clarification is required, please let me know and I will deliver.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,090
Default Searching and displaying records that match criteria.

D
Just off the top of my head, I would suggest a loop (Do or For loop),
something like the following:
First, make sure the data in the Master Data is sorted by the 3 fields you
site. All three. You could just add that to the beginning of the code.
Loop through all the Supplier Data and search for the first and last
instance of the Supplier No. in the Master Data range.
Set a range from this first to last Supplier No. to the variable SupplierNo.
Search the range SupplierNo.Offset(,1) for the first and last instances of
Product No. and set that range to the variable ProductNo.
Search the range ProductNo.Offset(,1) for the SiteNo.
If found, compare and copy as you wish.
Post back if this sounds promising and/or you need more. Otto

"D Zandveld" wrote in message
...
Hello again.

Experience level:
Good to Advanced in both Excel and VBA, i'm just stuck where to start!

I have 2 worksheets: Master Data and Supplier Data

Master Data contains information downloaded from our business warehouse:
Supplier no (key field 1)
Product no (key field 2)
Site no (key field 3)
Current price
Currency
Trading terms

Supplier Data contains pricing info from suppliers
Supplier no (key field 1)
Product no (key field 2)
Site no (key field 3)
Price - revised
Payment terms - revised
Currency
Trading Terms - revised

I want to produce a report based on the following logic:
IF
Supplier Data!Supplier no + Product no + Site no are found in Master Data,
THEN
compare based on price, terms (+ other criteria)
THEN
copy changes to 'Changes Report' worksheet.
(fields Supplier no, Product no, Site no, Old price, New price, Old terms,
%
change, new terms)

The result would be a report that shows all the line items that have
changed.

If more clarification is required, please let me know and I will deliver.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Searching and displaying records that match criteria.

This should get you started.
To automate, translate
Advanced Filter step into VBA
http://www.freefilehosting.net/download/3aki2
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Searching and displaying records that match criteria.

On Jan 21, 1:21 pm, Herbert Seidenberg
wrote:
This should get you started.
To automate, translate
Advanced Filter step into VBAhttp://www.freefilehosting.net/download/3aki2


Hi,
I've read your reply to the topic owner. I was a little bit curious
about your methodology. Could you please let me know what you did in
order to find the exact match.

Thanks,
Huong L
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default Searching and displaying records that match criteria.

Huong L
The key is the column named "SPSmatch".
The SUMPRODUCT formula says in effect:
Look at the combination of "Supplier", "Product" and "Site"
at this row and find that combination on the other sheet,
then give me the row where you found it.
"MPrice" and "Mterms" use the row number
to find the rest of the data at the found row.
Advanced Filter whittles down the list to items
that do not match.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
PARTIAL TEXT MATCH SEARCHING FOR THE FIRST 6 CHARACTERS? KLZA Excel Worksheet Functions 1 October 23rd 07 05:46 PM
MATCH Multiple Criteria & Return Previous / Penultimate Match Sam via OfficeKB.com Excel Worksheet Functions 27 October 6th 07 01:39 AM
Searching for particular records [email protected] Excel Discussion (Misc queries) 5 March 6th 07 10:51 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
searching cells - displaying data davemel Excel Discussion (Misc queries) 1 November 2nd 05 12:12 PM


All times are GMT +1. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"