Bulk cell anchoring

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,963
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

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
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
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832

ADVERTISEMENT

Now THAT is impressive!
it's impressive you were able to test and to reply within 2 minutes :LOL:
 

Airfix9

Well-known Member
Joined
Sep 23, 2005
Messages
886
Read it, understood what it was doing. No need to test, your reputation precedes you! :wink:
 

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,963

ADVERTISEMENT

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
 

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,963
Quick update, I've run this & it doesn't appear to have worked

The cells are all minus $

???
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
what do you mean
please provide an example: formula + expected result (and the result you get)

perhaps have your lunch first :)
 

MarkAndrews

Well-known Member
Joined
May 2, 2006
Messages
1,963
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
 

Forum statistics

Threads
1,136,616
Messages
5,676,838
Members
419,653
Latest member
analyticalchemist94

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
Top