Macro to add additional rows for orders paid in Multiple currencies

Status
Not open for further replies.

bearcub

Well-known Member
Joined
May 18, 2005
Messages
701
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
I need to develop a macro that is currently beyond me. Here is the scenario.

The company will sometimes book an order that will be paid in different currencies (e.g. USD, GBP, EUR, JPY, AUD, etc). We add a commission rate for each currency we're going to pay the rep on.

On a line we might have 5% to be paid to the US person, 3% paid to the UK person, etc.

What I would like to do is insert a new row, copy all the data from the source row, highlight the source row with the duplicate rows in one color and leave only one rate per line.

I would like to create a macro that will look at each cell on each row in the specified range and insert a new row for each line that contains more than one currency %.

I'm attaching a picture of situation where the initial report had one line but I added an extra line because their were to payments being paid in GBP and USD. In some cases, I might 4 or more people being paid in different parts of the world. If there were 4 people, I would need to add 3 copied rows with the one currency % per row. Does this make sense?

Here is an example:

Code:
Before					
Quote Line  	US (USD)	  UK (GBP)    Sub	US (USD)	UK (GBP)
QL-1186755        0.13%  	   7.41%       UK        147.52 	 8,520.19 
					
After					
Quote Line  	US (USD)	  UK (GBP)    Sub	US (USD)	UK (GBP)
QL-1186755		           7.41%       UK	      -   	 8,520.19 
QL-1186755        0.13%		               US	 147.52 	    -

Thank you for your help,

Michael
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Status
Not open for further replies.

Forum statistics

Threads
1,214,400
Messages
6,119,292
Members
448,885
Latest member
LokiSonic

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