Hello,
I need to write a macro that compares the numerical value of 2 cells and give me a result as described below:
All the numbers would be either whole numbers or whole numbers + 0.5
Example 1:
The two values are both whole numbers then no action is taken.
Cell A = 5
Cell B = 5
or
Cell A = 7
Cell B = 5
Result = No action taken
Example 2
The two values are both equal half numbers then 0.5 is subtracted from one number and 0.5 is added to the other number to make them both whole numbers.
Cell A = 5.5
Cell B = 5.5
Result = 0.5 is subtracted from Cell A to make it 5, 0.5 is added to Cell B to make it 6.
Example 3
The two values are unequal half numbers then 0.5 is subtracted from the number with the lower value and 0.5 is added to the number with the higher value to make them both whole numbers.
Cell A = 5.5
Cell B = 8.5
Result = 0.5 is added to Cell A to make it 6, 0.5 is subtracted from Cell B to make it 8.
I hope this makes sense.As I mentioned, I'm just learning to write macros so any help is GREATLY appreciated.
~Donny
Bookmarks