Macro for F2 "Enter" for all cells in worksheet

cnscpa

New Member
Joined
Sep 27, 2010
Messages
1
I have an Excel dashboard workbook. When I go offsite, the formulas error out because I am off the network (so Excel can't link up to the other software). The only way to "re-activate" the formulas is to hit "F2" and "Enter" in each cell. One of the worksheets has 90,000 formulas.

How do you write a MACRO that will look at each cell and do "F2" and "Enter" so I don't have to manually?

Thx
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi cnscpa,

Welcome to the forum!!

Can you state what range you're using, or at least the starting row number / column letter to the last column letter? I could post a macro that could check all cells, but it would be far more efficient if it was narrowed down.

Regards,

Robert
 
Upvote 0
I actually have to sign off now for a few hours, so post back re how this goes:

Code:
Sub Macro2()
    
    Dim rngCell As Range
    
    Application.ScreenUpdating = False
        
    For Each rngCell In Cells.SpecialCells(xlCellTypeFormulas)
        '//Calculate every formula cell in the active sheet//
        'Note that it's far better to calculate each cell _
        (effectively the same as pressing "F2") than using _
        SENDKEYS to mimic "F2" and "Enter".
        rngCell.Calculate
    Next rngCell
    
    Application.ScreenUpdating = True
    
End Sub

Regards,

Robert
 
Upvote 0
I have an Excel dashboard workbook. When I go offsite, the formulas error out because I am off the network (so Excel can't link up to the other software). The only way to "re-activate" the formulas is to hit "F2" and "Enter" in each cell. One of the worksheets has 90,000 formulas.

How do you write a MACRO that will look at each cell and do "F2" and "Enter" so I don't have to manually?

Thx

Do a FInd/Replace on the cells, finding = and replacing with =. Naturally, you can program a macro to do this for you.
 
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top