PDA

View Full Version : Solved: Convert sale amounts ..



gacid
11-14-2008, 07:03 AM
Hi all. I got problems with a (for me) diffcult VBA-code.
Here it goes:

There are two Excel files with data that are necessary in order to solve the job. The file "SalesAmount.xlsx" contains a list of sales amount and the currency they are denominated as. The file "ExchangeRates.xlsx" contains a list of the currencies and their respective rates/prizes.

http://imageload.dk/files/4808fd8cae5fa2c193c591970e809953.JPG

ExchangeRates.xlsx : last row in this worksheet is 39
SalesAmount.xlsx : last row in this worksheet is 328

Now the job is to make a top 10 list of the largest sales measured in Danish kroner (DKK), which of course requires that all amounts are converted from their original currency to DKK.


It could look like this:
http://imageload.dk/files/e16871ee6c33665dce62e7df75986cb5.JPG

I just dont know how to make. Hopefully someone can help me out :)
Regards

The last picture, is the workbook I want to make.

EDIT: Here is the two workbooks "SalesAmount.xlsx" & "ExchangeRates.xlsx":
10743

Bob Phillips
11-14-2008, 07:28 AM
Post the workbooks, and it will be fairly straight-forward.

gacid
11-17-2008, 03:29 AM
Anyone?

Bob Phillips
11-17-2008, 03:56 AM
.

gacid
11-17-2008, 05:19 AM
Thanks xld.

But where's the VBA-code, there's is solving my problem? I need that code :)

Bob Phillips
11-17-2008, 05:33 AM
There is none, it is all done by formulae.

gacid
11-17-2008, 12:38 PM
Okay. I need a VBA-code there are doing the same

Bob Phillips
11-17-2008, 02:04 PM
Why, isn't working good enough?

MaximS
11-17-2008, 02:37 PM
you can try my macro solution.

see attachments for details.

Hunden
11-19-2008, 12:29 PM
you can try my macro solution.

see attachments for details.

I got almost same problem. Is it possible that you can make that in a freindly code?:) That i can understand.

Hunden
11-19-2008, 01:56 PM
you can try my macro solution.

see attachments for details.

Is it possible you can tell me what the code do, line for line ?:)

MaximS
11-19-2008, 08:06 PM
will be better if you tell me which lines you don't understand and give me more details what your example needs doing.

rbrhodes
11-20-2008, 01:11 AM
Ok,

With apologies to all here's a VBA solution. gacid for your original request,



I got problems with a (for me) diffcult VBA-code.

Note: OP asks for VBA

XLD for your formula solution and MaximS for your VBA solution.

Hunden, as you have the same problem, look at this too although it is built on gacid's sheets example.

gacid
11-20-2008, 02:32 AM
Problem is solved!

You're a genius rbrhodes! Thank you for your help!!

Hunden
11-20-2008, 03:21 AM
Ok,

With apologies to all here's a VBA solution. gacid for your original request,



Note: OP asks for VBA

XLD for your formula solution and MaximS for your VBA solution.

Hunden, as you have the same problem, look at this too although it is built on gacid's sheets example.

Thanks alot mr. rbrhodes!

Hunden
11-20-2008, 09:17 AM
Thanks again

lucas
11-21-2008, 10:34 AM
gacid and hunden are the same ip address-banned.

see this thread for any questions regarding this decision:

http://vbaexpress.com/forum/showthread.php?t=23709