ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Shortcut for autocalculate (https://www.excelbanter.com/excel-discussion-misc-queries/4023-shortcut-autocalculate.html)

FOG

Shortcut for autocalculate
 
I am not fond about using a mouse in excel and was trying to found a way to
change the autocalculation function with the keyboard but haven't found
any... can anyone please help me about this?

Thank you


Dave Peterson

alt-t,o,c (enough times to get to the Calculation tab), m (enter)

You may want to record a macro that toggles calculation and then assign that
macro a nice shortcut key--kind of like:

Option Explicit
Sub toggleCalc()
Dim myStr As String
With Application
Select Case .Calculation
Case Is = xlCalculationAutomatic
.Calculation = xlCalculationManual
myStr = "manual"
Case Else:
.Calculation = xlCalculationAutomatic
myStr = "automatic"
End Select
End With

MsgBox "Calculation set for: " & myStr

End Sub

(there's a third calculation mode, but I don't use it. (I'd find it irrating to
cycle through xlcalculationsemiautomatic.)

FOG wrote:

I am not fond about using a mouse in excel and was trying to found a way to
change the autocalculation function with the keyboard but haven't found
any... can anyone please help me about this?

Thank you


--

Dave Peterson

FOG

Thank you for the Help Dave. I think my question was not clear enough.

The autocalculation I want to change with the keyboard is the one down the
status bar, where you can right click to select wether you wish to obtain a
sum, count, average, etc... the result is displayed in the status bar itself.

Thank you
FOG


"Dave Peterson" wrote:

alt-t,o,c (enough times to get to the Calculation tab), m (enter)

You may want to record a macro that toggles calculation and then assign that
macro a nice shortcut key--kind of like:

Option Explicit
Sub toggleCalc()
Dim myStr As String
With Application
Select Case .Calculation
Case Is = xlCalculationAutomatic
.Calculation = xlCalculationManual
myStr = "manual"
Case Else:
.Calculation = xlCalculationAutomatic
myStr = "automatic"
End Select
End With

MsgBox "Calculation set for: " & myStr

End Sub

(there's a third calculation mode, but I don't use it. (I'd find it irrating to
cycle through xlcalculationsemiautomatic.)

FOG wrote:

I am not fond about using a mouse in excel and was trying to found a way to
change the autocalculation function with the keyboard but haven't found
any... can anyone please help me about this?

Thank you


--

Dave Peterson


Dave Peterson

I'm not even sure you can get to that area of the statusbar without clicking.

On the other hand, you could still use a macro assigned to a shortcut key:

Option Explicit
Sub testme()
Dim myRng As Range

Set myRng = Nothing
On Error Resume Next
Set myRng = Intersect(Selection, _
Selection.Cells.SpecialCells(xlCellTypeVisible))
On Error GoTo 0

If myRng Is Nothing Then
MsgBox "Nothing Visible"
Else
With Application
MsgBox "Sum: " & .Sum(myRng) & vbLf _
& "Count Nums: " & .Count(myRng) & vbLf _
& "Count: " & .CountA(myRng) & vbLf _
& "Average: " & .Average(myRng) & vbLf _
& "Min: " & .Min(myRng) & vbLf _
& "Max: " & .Max(myRng) & vbLf _
& "Count of Cells: " & myRng.Cells.Count
End With
End If

End Sub

====
You could add anything you like.



FOG wrote:

Thank you for the Help Dave. I think my question was not clear enough.

The autocalculation I want to change with the keyboard is the one down the
status bar, where you can right click to select wether you wish to obtain a
sum, count, average, etc... the result is displayed in the status bar itself.

Thank you
FOG

"Dave Peterson" wrote:

alt-t,o,c (enough times to get to the Calculation tab), m (enter)

You may want to record a macro that toggles calculation and then assign that
macro a nice shortcut key--kind of like:

Option Explicit
Sub toggleCalc()
Dim myStr As String
With Application
Select Case .Calculation
Case Is = xlCalculationAutomatic
.Calculation = xlCalculationManual
myStr = "manual"
Case Else:
.Calculation = xlCalculationAutomatic
myStr = "automatic"
End Select
End With

MsgBox "Calculation set for: " & myStr

End Sub

(there's a third calculation mode, but I don't use it. (I'd find it irrating to
cycle through xlcalculationsemiautomatic.)

FOG wrote:

I am not fond about using a mouse in excel and was trying to found a way to
change the autocalculation function with the keyboard but haven't found
any... can anyone please help me about this?

Thank you


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 06:16 AM.

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