ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I get a macro to populate the answer into one specific cel (https://www.excelbanter.com/excel-discussion-misc-queries/224593-how-can-i-get-macro-populate-answer-into-one-specific-cel.html)

Matt

How can I get a macro to populate the answer into one specific cel
 
I want to record a Macro that when clicked on, will run a formula and
populate the answer into the same specific cell every time it's clicked, no
matter what cell my cursor is active in at the moment I click the macro. Is
there a way to do this?

Right now I have the macro performing the calculation properly, but it
populates the answer into whatever cell I happen to be active in when I click
the macro. I want it to always populate the answer into one specific cell.

Any help would be greatly appreciated.

FSt1

How can I get a macro to populate the answer into one specific cel
 
hi
it would help if you post your code.

Regards
FSt1

"Matt" wrote:

I want to record a Macro that when clicked on, will run a formula and
populate the answer into the same specific cell every time it's clicked, no
matter what cell my cursor is active in at the moment I click the macro. Is
there a way to do this?

Right now I have the macro performing the calculation properly, but it
populates the answer into whatever cell I happen to be active in when I click
the macro. I want it to always populate the answer into one specific cell.

Any help would be greatly appreciated.


Matt

How can I get a macro to populate the answer into one specific
 
Sub SHARECALCA()
'
' SHARECALCA Macro
' Macro recorded 3/17/2009 by Matthew J. O'Neill
'

'
ActiveCell.FormulaR1C1 = "=MROUND((R6C3*100/R6C4),1000)"
Range("B6").Select
Selection.Copy
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub






"FSt1" wrote:

hi
it would help if you post your code.

Regards
FSt1

"Matt" wrote:

I want to record a Macro that when clicked on, will run a formula and
populate the answer into the same specific cell every time it's clicked, no
matter what cell my cursor is active in at the moment I click the macro. Is
there a way to do this?

Right now I have the macro performing the calculation properly, but it
populates the answer into whatever cell I happen to be active in when I click
the macro. I want it to always populate the answer into one specific cell.

Any help would be greatly appreciated.


FSt1

How can I get a macro to populate the answer into one specific
 
hi
right now you formula is keying on C6 and D6 and pasting the results in B6.
is that what you want????

Regards
FSt1

"Matt" wrote:

Sub SHARECALCA()
'
' SHARECALCA Macro
' Macro recorded 3/17/2009 by Matthew J. O'Neill
'

'
ActiveCell.FormulaR1C1 = "=MROUND((R6C3*100/R6C4),1000)"
Range("B6").Select
Selection.Copy
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End Sub






"FSt1" wrote:

hi
it would help if you post your code.

Regards
FSt1

"Matt" wrote:

I want to record a Macro that when clicked on, will run a formula and
populate the answer into the same specific cell every time it's clicked, no
matter what cell my cursor is active in at the moment I click the macro. Is
there a way to do this?

Right now I have the macro performing the calculation properly, but it
populates the answer into whatever cell I happen to be active in when I click
the macro. I want it to always populate the answer into one specific cell.

Any help would be greatly appreciated.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com