Two company names merged

K

Kathi

I have data in a table with two company names that are one company. I like to
combine into one company along qty and price but only keeping one company
name. Sold To would have the same number.

Sold To1, Company1, Qty1, Price1
Sold To1, Company2, Qty2, Price2
 
F

fredg

I have data in a table with two company names that are one company. I like to
combine into one company along qty and price but only keeping one company
name. Sold To would have the same number.

Sold To1, Company1, Qty1, Price1
Sold To1, Company2, Qty2, Price2

Do you mean you have a company listed, for example, as Ford Motor Co.
and also as FMC and you wish to combine the records?
If so, something like this should do it:

Select [SoldTo],IIf([CompanyName] = "Ford Motor Co." Or [CompanyName]
= "FMC","Ford Motor Co.",[CompanyName]) as NameOfCompany,
[Qty],[Price] From YourTable

Then us [NameOfCompany] in your report instead of [CompanyName].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top