hunsnowboard
10-28-2010, 04:04 AM
Hi Everybody! I have the following problem. I have two files (file A and file B). The content of the files is almost identical (everything is in the same place, same cells) the only difference is that file A has its values in Euros file B has its values in USD. Both files have many sheets all with many numbers.
Is it possible to have a macro which will check (with a given currency rate) if the values are correct? So basically the macro should first check if in workbook A that a cell contains a numerical value (not empty, not text, not formula just a numerical value) and then and if it is a numerical value.... then check the same cell in workbook B and compare it with the currency rate. So if the given currency rate is 1,5 and file A has the value 10 in Sheet1, Cell A1..then the macro should check the value in file B Sheet2, Cell A1 and the value should be 15. If the value is correct then the macro should move to the next cell and so on till finds an incorrect value. In case of incorrect value the macro should display a message box and locating the address of the incorrect cell and stop.
If everything is correct then at the end should display a message box that every value is good and it has finished.
Excel version: 2007
Is it possible to make this macro?
Thank you in advancem for your help!
Is it possible to have a macro which will check (with a given currency rate) if the values are correct? So basically the macro should first check if in workbook A that a cell contains a numerical value (not empty, not text, not formula just a numerical value) and then and if it is a numerical value.... then check the same cell in workbook B and compare it with the currency rate. So if the given currency rate is 1,5 and file A has the value 10 in Sheet1, Cell A1..then the macro should check the value in file B Sheet2, Cell A1 and the value should be 15. If the value is correct then the macro should move to the next cell and so on till finds an incorrect value. In case of incorrect value the macro should display a message box and locating the address of the incorrect cell and stop.
If everything is correct then at the end should display a message box that every value is good and it has finished.
Excel version: 2007
Is it possible to make this macro?
Thank you in advancem for your help!