excel - Using VBA To Convert A Column of Formulas From Relative To Fixed Reference -


first off, apologies if silly question. i'm new vba. searched online answer couldn't find it.

i'm trying convert long column of formulas relative references absolute cell references. essentially, vba go through column, select cell, "hit f4" , move next cell.

i recorded action in vba , got following:

activecell.formular1c1 = "='worksheet'!r11c9" range("g5212").select 

my question in command equivalent of hitting f4? i'm not @ reading vba , i'm trying understand this. and, of course, if i'm going wrong way please let me know. thank you.

dim lastcell range  set lastcell = range("g" & rows.count).end(xlup) range("g1", lastcell).formula = application.convertformula _ (formula:=range("g1", lastcell).formula, fromreferencestyle:=xla1, _ toreferencestyle:=xla1, toabsolute:=xlabsolute) 

change column needed. assumed g based on question.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -