Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Excel formula

  1. #1
    Guest

    Default

    Looking for how to write a program that will look at 3 cells and perform a calculation using the values in the cells that have a number in them...any two of the cells will have a number keyed into them and the third used the first 2 to find it's value-
    example:
    col1 col2 col3
    (blank) 15 12475

    col1's value is col3 minus col2.....

    col1 col2 col3
    12300 15 (blank)

    This is elementary, I know, but I am stuck...
    Thanks

  2. #2
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Anonymous,

    This cannot be done with a worksheet formula. It requires a worksheet event routine. Such a routine is straightforward, and I would be happy to provide it, but first there is a question you must consider. Suppose you have entered the two values, and the third is automatically created for you. No problem. Now suppose you notice that you typed the number in wrong, so you got the wrong answer. In fact, suppose you notice this sometime later, after you have changed other cells. So you simply go back and enter the correct number. But remember, the other two cells now contain values. How is the routine to know at this point which of the other two cells to re-calculate? You must find a way to tell it. Perhaps this could be indicated by manually clearing the contents of the cell you want to be re-calculated before editing the input cell? Another possibility is to mark the cell you want re-calculated in some way--say, selecting it and clicking a button, or possibly filling it temporarily with a color (the macro could clear it when done).

    Damon

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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