VBA code: copy range from several sheets into one and erase double rows

Status
Not open for further replies.

oldb

New Member
Joined
Mar 17, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

I have a workbook with several sheets (one for each month) which contain customer names (all in column A) and I need to bring them all together in another sheet (let's just call it sheet1). Then I need to erase the ones that are double (triple and so on) so I have the customer only once in sheet1 (and have them arranged alphabetically would be nice too). Problem is there are 3 types of customers (one pays in Dollar, one in Yen and one in Peso) and I need them separated. Also after the customers name there are these annoying brackets that I need to erase (for that I already have a macro but it would be nice if it could be implemented or something).

Little example (it looks sort of like this):
mrexcel.png

So C1,3,4 and 5 are double... I need to erase the brackets with the numbers (for which I have a macro) and then have the range from JPY to MXN copied to one sheet and then MXN to USD copied to another sheet and last from USD to the first empty cell to another sheet. Then have them arranged alphabetically (because obviously they're not called C1...) and erase all that are double or more and then have them all copied (JPY)(MXN)(USD) to another sheet where my calculation formulas are...

Seems kind of complicated now that I read it... Maybe there's a better way... Basically I need to list all customers from all months in one list (each of them just once) and do some calculation for which I have formulas. Listing them is the problem... help would be very much appreciated...
Thank you
 
Last edited:

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi guys,

I have a workbook with several sheets (one for each month) which contain customer names (all in column A) and I need to bring them all together in another sheet (let's just call it sheet1). Then I need to erase the ones that are double (triple and so on) so I have the customer only once in sheet1 (and have them arranged alphabetically would be nice too). Problem is there are 3 types of customers (one pays in Dollar, one in Yen and one in Peso) and I need them separated. Also after the customers name there are these annoying brackets that I need to erase (for that I already have a macro but it would be nice if it could be implemented or something).

Little example (it looks sort of like this):
View attachment 35798
So C1,3,4 and 5 are double... I need to erase the brackets with the numbers (for which I have a macro) and then have the range from JPY to MXN copied to one sheet and then MXN to USD copied to another sheet and last from USD to the first empty cell to another sheet. Then have them arranged alphabetically (because obviously they're not called C1...) and erase all that are double or more and then have them all copied (JPY)(MXN)(USD) to another sheet where my calculation formulas are...

Seems kind of complicated now that I read it... Maybe there's a better way... Basically I need to list all customers from all months in one list (each of them just once) and do some calculation for which I have formulas. Listing them is the problem... help would be very much appreciated...
Thank you
already solved... thanks anyway
 
Upvote 0
Glad to hear you got the solution.

Do you mind posting about your solution? Then it is perfectly fine to mark your post as the solution to help future readers.
 
Upvote 0
Glad to hear you got the solution.

Do you mind posting about your solution? Then it is perfectly fine to mark your post as the solution to help future readers.
Hi Peter,

turns out my solution didn't work, but I thought about a less complicated way of describing what I want so I think I'll just write a new thread. would erase this one but it seems that's not possible. Sorry and thank you.
 
Upvote 0
OK, thanks for the update. I have locked this thread.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,533
Messages
6,120,076
Members
448,943
Latest member
sharmarick

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