+ Reply to Thread
Results 1 to 2 of 2

How to be able to write input or output in cells and get a calculation

  1. #1
    Registered User
    Join Date
    10-03-2016
    Location
    skogen
    MS-Off Ver
    2010
    Posts
    1

    How to be able to write input or output in cells and get a calculation

    Hi,
    I Want to be able to write in two cells, and that the other cells automaticly calculates a value in the other one, and vice versa.
    In column A i will have Liter, and in column B i will have gallon. If i write in column A it gives output in column B as gallon, and if i write in column B it gives output in column A as liters.
    Is this possible?

    Thank you!

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: How to be able to write input or output in cells and get a calculation

    Yes, only with VBA, no formulas (but as this is posted in the VBA forum...)

    Use the WorksheetChange event to determine which cell (Col A or B) was changed, do the appropriate calculation with the input value and place the result in the other cell. You will need to disable Events to prevent cascading events (one cell changes another which runs the code again and changes the first which runs... Eventually Excel falls over).

    Description only - this is easy code with a caveat (cascading events) and is an ideal learning experience.
    Last edited by cytop; 10-04-2016 at 04:09 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Transferring of input from input cell to output cells
    By bebongtheshark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-09-2014, 01:28 AM
  2. [SOLVED] Running a calculation X times with changing inputs and placing of output into cells
    By Bouje in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-29-2014, 10:36 AM
  3. Function to Input sets of data, then write the output
    By Nater5000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2013, 04:25 PM
  4. Replies: 13
    Last Post: 01-24-2012, 09:38 AM
  5. Automate calculation of output based on user input
    By tenn0228 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-02-2009, 06:24 PM
  6. Combine cells for user input/print friendly output
    By rus in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 09-25-2009, 03:44 PM
  7. Replies: 1
    Last Post: 09-23-2009, 05:27 AM

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