Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am very new at Macros and no experience with VB, but I need to create a Macro that would allow me to display the formula within the cell to the right of the Total Value cell. For example A2=3 A3=6 A4=9 A5=18 (=A2+A3+A4) C3=5 C4=8 C5=1 C6=14 (=C3+C4+C5) I want to display the Formula in cell B5 as =A2+A3+A4 and C6 as =C3+C4+C5 and this can be at any place in the worksheet. So, whenever I press the ENTER key after creating the formula to calculate the sum, I want the system to display the formula to the right of the cell that contains the sum value. Is there a way to create a Macro so that I can just press a key combination to make this work? Thank you in advance for your help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
not sure if this will help you but if you want a key combination to display your formulas, try these 2 keys togeather..... Ctrl + ~. this is display formula mode and will display all formulas on the sheet. It's boolean meaning that press Ctrl+~ again and you go back to normal mode. regards FSt1 "Bagia" wrote: Hello, I am very new at Macros and no experience with VB, but I need to create a Macro that would allow me to display the formula within the cell to the right of the Total Value cell. For example A2=3 A3=6 A4=9 A5=18 (=A2+A3+A4) C3=5 C4=8 C5=1 C6=14 (=C3+C4+C5) I want to display the Formula in cell B5 as =A2+A3+A4 and C6 as =C3+C4+C5 and this can be at any place in the worksheet. So, whenever I press the ENTER key after creating the formula to calculate the sum, I want the system to display the formula to the right of the cell that contains the sum value. Is there a way to create a Macro so that I can just press a key combination to make this work? Thank you in advance for your help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is what is displayed in the formula bar..(From menu View--FormulaBar)
If you really need a macro find below...Launch VBE using Alt+ F11. Insert module and copy the macro. Save and close VBE. From Tools|Macro select the macro and from Options assign a hot key... Sub DisplayFormula() If Left(ActiveCell.Formula, 1) = "=" Then If ActiveCell.Formula < "" Then ActiveCell.Offset(0, 1) = _ "(" & ActiveCell.Formula & ")" End If End Sub If this post helps click Yes --------------- Jacob Skaria "Bagia" wrote: Hello, I am very new at Macros and no experience with VB, but I need to create a Macro that would allow me to display the formula within the cell to the right of the Total Value cell. For example A2=3 A3=6 A4=9 A5=18 (=A2+A3+A4) C3=5 C4=8 C5=1 C6=14 (=C3+C4+C5) I want to display the Formula in cell B5 as =A2+A3+A4 and C6 as =C3+C4+C5 and this can be at any place in the worksheet. So, whenever I press the ENTER key after creating the formula to calculate the sum, I want the system to display the formula to the right of the cell that contains the sum value. Is there a way to create a Macro so that I can just press a key combination to make this work? Thank you in advance for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy and Paste function | Excel Worksheet Functions | |||
Macro newbie - simple copy/paste function | Excel Programming | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |