Results 1 to 17 of 17

New to writing macros

Threaded View

  1. #1
    Registered User
    Join Date
    11-01-2006
    Posts
    24

    New to writing macros- Please help.

    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
    Last edited by ynnod; 08-31-2007 at 11:00 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1