+ Reply to Thread
Results 1 to 4 of 4

Auto calculate on entering a figure

  1. #1
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Question Auto calculate on entering a figure

    Hi

    I would like to have a macro or something running in the background of my spreadsheet so that when I enter the letter "c" in Cell B4 it becomes active and runs a formula - (B2*7)/47 - and places the result in cell B4, by removing the letter "c". This is to be done as I type the info in.

    So, basically as I type the letter "c" in B4 - excel automatically calculates (B2*7)/47 and replaces "c" in B4 with the result of the calculation.

    This is only to happen if the letter "c" is typed into B4 - it should not run if any other character/figure is typed into B4 - in fact if another character/figure is typed, then that character/figure should stay in B4.

    Is this possible?

    All help appreciated, as always.
    Last edited by tony0710; 06-22-2010 at 10:40 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Auto calculate on entering a figure

    Why not just use a formula in another cell?

    =if(b4 = "c", 7*b2/47, "")
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    12-27-2007
    Posts
    106

    Re: Auto calculate on entering a figure

    Hi Shg

    I thought of that - but just didn't want to add another column.

    Then again if this is the only way - then perhaps =If(B4="c",((B2*7)/47),B4) will work I assume. Will just have to alter the spreadsheet a bit.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Auto calculate on entering a figure

    Yes, you just have more parens than you need.

+ 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