Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Showing Formula and Result
Hi All,
I'm very new to writing Macro's in excel, what I want to know is If I have a macro which tells excel that Cell A1 = Cell A2 * Cell A3. Then is it possible that once the macro executes that the result is shown in cell A1 and if you click on cell A1 you can also see the formula i.e =A2*A3, rather than just being able to see the result which is how it is at the moment. Thanks. Simon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Showing Formula and Result
Range("A1").Formula = "=A2*A3"
-- Regards, Tom Ogilvy "Simon" wrote in message ... Hi All, I'm very new to writing Macro's in excel, what I want to know is If I have a macro which tells excel that Cell A1 = Cell A2 * Cell A3. Then is it possible that once the macro executes that the result is shown in cell A1 and if you click on cell A1 you can also see the formula i.e =A2*A3, rather than just being able to see the result which is how it is at the moment. Thanks. Simon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Showing Formula and Result
What you want to do is not possible (if I understand the question correctly).
Your macro pastes the value of the product of Cells A2 and A3 into A1. If A2 is 2 and A3 is 3 then your macro puts the number 6 into Cell A1. This is just a number and cell A1 has no idea how that number got in there. Tom's solution is the best idea in that instead of the 6 into A1 it puts the formula into A1 which gives you what you need. -- HTH... Jim Thomlinson "Simon" wrote: Hi All, I'm very new to writing Macro's in excel, what I want to know is If I have a macro which tells excel that Cell A1 = Cell A2 * Cell A3. Then is it possible that once the macro executes that the result is shown in cell A1 and if you click on cell A1 you can also see the formula i.e =A2*A3, rather than just being able to see the result which is how it is at the moment. Thanks. Simon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula result showing 0 | Excel Discussion (Misc queries) | |||
Formula Showing In A Cell Instead of Proper Result | New Users to Excel | |||
VLOOKUP result is not showing up - only the formula | Excel Worksheet Functions | |||
formula in cell not showing result | Excel Worksheet Functions | |||
Formula result not showing in cell | Excel Worksheet Functions |