Excel formula

G

Guest

Guest
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
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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
 
Upvote 0

Forum statistics

Threads
1,214,630
Messages
6,120,634
Members
448,973
Latest member
ChristineC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top