Bulk cell anchoring

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,970
Office Version
  1. 2010
Platform
  1. Windows
I have this table
FE Monthly Analysis.xls
ABCDEFGHIJ
1Bradford
2FeeEarnerAprilMayJuneAverageFeeEarnerJulyAugustSeptemberAverage
3AYasmin72%106%100%93%AYasmin96%79%88%
4BKelly BKelly121%80%101%
5BVickers170%153%162%BVickers108%120%114%
Data - %


I need to anchor all the cells (formula's) in columns E & J

Can this be done through a bulk process?

TIA
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi,

do you mean making the references ABSOLUTE ? $A$1
then try this
select range and run code
Code:
Option Explicit

Sub formulas_absolute()

'Erik Van Geit
'051119
'change formulas to absolute
     
Dim Cell As Range
Dim RNG As Range
Dim AppSetCalc As Integer
Dim AppSetEnEv As Integer

On Error Resume Next
Set RNG = Selection.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
    If RNG Is Nothing Then
    MsgBox "No formulas found in selection", 48, "TITLE"
    Exit Sub
    End If

    With Application
    .ScreenUpdating = False
    AppSetCalc = .Calculation
    .Calculation = xlCalculationManual
    AppSetEnEv = .EnableEvents
    .EnableEvents = False
    End With
        
For Each Cell In RNG
Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlAbsolute)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlAbsRowRelColumn)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlRelRowAbsColumn)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlRelative)
Next Cell

    With Application
    .ScreenUpdating = True
    .Calculation = AppSetCalc
    .EnableEvents = AppSetEnEv
    End With

End Sub
kind regards,
Erik
 
Upvote 0
Read it, understood what it was doing. No need to test, your reputation precedes you! :wink:
 
Upvote 0
Thats the one Erik - Absolute reference

I'll give it a try after a spot of lunch

Thanks as ever :biggrin:

Hi,

do you mean making the references ABSOLUTE ? $A$1
then try this
select range and run code
Code:
Option Explicit

Sub formulas_absolute()

'Erik Van Geit
'051119
'change formulas to absolute
     
Dim Cell As Range
Dim RNG As Range
Dim AppSetCalc As Integer
Dim AppSetEnEv As Integer

On Error Resume Next
Set RNG = Selection.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
    If RNG Is Nothing Then
    MsgBox "No formulas found in selection", 48, "TITLE"
    Exit Sub
    End If

    With Application
    .ScreenUpdating = False
    AppSetCalc = .Calculation
    .Calculation = xlCalculationManual
    AppSetEnEv = .EnableEvents
    .EnableEvents = False
    End With
        
For Each Cell In RNG
Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlAbsolute)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlAbsRowRelColumn)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlRelRowAbsColumn)
'Cell.Formula = Application.ConvertFormula(Cell.Formula, 1, 1, xlRelative)
Next Cell

    With Application
    .ScreenUpdating = True
    .Calculation = AppSetCalc
    .EnableEvents = AppSetEnEv
    End With

End Sub
kind regards,
Erik
 
Upvote 0
Quick update, I've run this & it doesn't appear to have worked

The cells are all minus $

???
 
Upvote 0
what do you mean
please provide an example: formula + expected result (and the result you get)

perhaps have your lunch first :)
 
Upvote 0
Hi Erik

I ran your code in my workbook & the cells i mentioned above are exactly as they were before (Not Absolute?)

I'm puzzled
 
Upvote 0

Forum statistics

Threads
1,213,568
Messages
6,114,348
Members
448,570
Latest member
rik81h

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