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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,214,994
Messages
6,122,633
Members
449,092
Latest member
bsb1122

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