Comibed Prouct and delete duplicate

farhan11941234

New Member
Joined
Dec 14, 2019
Messages
29
Office Version
  1. 365
Platform
  1. Windows
In Id Column there are duplicate entries but product column is different. i want to combine product line A or A+B or A+B+C in next column and delete duplicates entries in column A.
please see snapshot of spreadsheet.
 

Attachments

  • Sample.png
    Sample.png
    8.7 KB · Views: 16
thanks for this great sub its working fine, could you please modify the sub as i have attached images.
 

Attachments

  • R.png
    R.png
    11 KB · Views: 6
  • S.png
    S.png
    15 KB · Views: 7
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
In case you are wondering ...
- this line deletes rows where the same product is listed TWICE or more against the same ID
VBA Code:
ws.Range("A:B").RemoveDuplicates Columns:=Array(1, 2), Header:=xlYes

So these values ...
100008 E
100008 D
100008 E

Currently return
100008 D+E

But that line should be removed if you want this returned
100008 D+E+E
 
Upvote 0
Product Column where product has Value B Has rate value as Well, i want to have rate value and delete the other rows
 
Upvote 0
Like Cell A2 and A3 have same Id respectively Product A and B but E3 has Value 2, row A2 will be deleted and combine the product A+ B and the pattern goes down
 
Upvote 0
thanks for this great sub its working fine, could you please modify the sub as i have attached images.

You should have explained that in post#1
- it looks like your amended requirement requires a different approach
- To maximise your chance of getting a good solution efficiently (for everyone) , I suggest you start a new thread fully explaining what is required and making sure that your sample data is typical of EVERY situation that may arise

Posting data
Images are nice and can be helpful at times but for this type of problem it is usually easier to also have some data that can be grabbed
You may find it useful to load this tool to post sample data into a thread

Note - there are a few "teething" issues with this new tool . If you encounter problems click on link below to see if the problem has already been spotted - many problems already have a workaround
 
Upvote 0
Book1
ABCDEF
1IDProductNameAddrssRateCell No
2100001AJohn123345
3100001BJohn1232345
4100002ABillxyz321
5100002BBillxyz2321
6100002CBillxyz321
7100003AWillAsd301
8100003BWillAsd4301
9100003CWillAsd301
10100004AHarryGhq300
11100004BHarryGhq6300
12100005ASupermanjkl390
13100006ABatmanmno287
14100007AJokerqwe210
15100008AAlenPoiuy654
16100008BAlenPoiuy8654
17100008CAlenPoiuy654
18Sample Data
19
20
Sheet1
 
Upvote 0
Book1
JKLMNO
1IDProductNameAddrssRateCell No
2100001A+BJohn1232345
3100002A+B+CBillxyz2321
4100003A+B+CWillAsd4301
5100004A+BHarryGhq6300
6100005ASupermanjkl390
7100006ABatmanmno287
8100007AJokerqwe210
9100008A+B+CAlenPoiuy8654
10Expected Result
11
12
Sheet1
 
Upvote 0
Just a thought - I have looked at your images again

Q Does the data in columns C:F affect the result required in ANY way (except that those columns should be included in the output) ?
- If data in those columns is not required to be interrogated, then only a simple modification to the code is required

Please let me know
 
Upvote 0
You should have explained that in post#1
- it looks like your amended requirement requires a different approach
- To maximise your chance of getting a good solution efficiently (for everyone) , I suggest you start a new thread fully explaining what is required and making sure that your sample data is typical of EVERY situation that may arise

Posting data
Images are nice and can be helpful at times but for this type of problem it is usually easier to also have some data that can be grabbed
You may find it useful to load this tool to post sample data into a thread

Note - there are a few "teething" issues with this new tool . If you encounter problems click on link below to see if the problem has already been spotted - many problems already have a workaround


I am New Here, I should share the entire problem on Post # 1.
The tool you suggested is awesome
 
Upvote 0
Just a thought - I have looked at your images again

Q Does the data in columns C:F affect the result required in ANY way (except that those columns should be included in the output) ?
- If data in those columns is not required to be interrogated, then only a simple modification to the code is required

Please let me know
data in columns C:F is required
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,860
Members
449,472
Latest member
ebc9

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