+ Reply to Thread
Results 1 to 3 of 3

Automate function

  1. #1
    Registered User
    Join Date
    01-23-2005
    Posts
    2

    Automate function

    Hello

    I'm a newbie of excell and have a simple question...

    Lets say I have/fill columns A and B with integers and I want to by automation calculate the difference B-A how do I do that.....I know how I do for one row but I wants a formula like B[i]-A[i]=C[i] where i is the current row so I dont have to do it every time I put some values in column A and B

    Thanks in advance!

    Best regards/D_D

  2. #2
    Registered User
    Join Date
    02-28-2004
    Location
    Oregon
    Posts
    35
    Hi,

    You could do this with a one step formula, or with a macro. Let's look at both options..

    Formula:

    Select the range in C adjacent to the data in column B and A.
    With C1 as the activecell, enter ..
    =B1-A1
    Confirm with Ctrl + Enter.


    Macro:

    Please Login or Register  to view this content.
    To run the macro routine, copy the above code --> press Alt + F11 (to open the Visual Basic Editor or VBE) --> Insert --> Module --> paste on right.


    HTH
    Regards,
    Zack Barresse

  3. #3
    Registered User
    Join Date
    01-23-2005
    Posts
    2
    Thank you!

+ Reply to Thread

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