Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula result showing 0 Rajula Luke - This is my display name Excel Discussion (Misc queries) 3 March 9th 10 12:21 PM
Formula Showing In A Cell Instead of Proper Result DanK New Users to Excel 2 March 4th 06 06:46 AM
VLOOKUP result is not showing up - only the formula Linda Excel Worksheet Functions 10 December 21st 05 06:37 AM
formula in cell not showing result Leolin Excel Worksheet Functions 8 March 18th 05 05:36 PM
Formula result not showing in cell Leolin Excel Worksheet Functions 2 March 17th 05 06:03 AM


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"