Two company names merged

  • Thread starter Thread starter Kathi
  • Start date Start date
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
 
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].
 
Back
Top