Changing formulas to absolute references and, if not possible, converting them to mixed references.

Josecarlospdcj

New Member
Joined
Sep 1, 2023
Messages
6
Office Version
  1. 2010
Olá pessoal!
O código VBA que tenho no momento muda "L15" para "$L$15" nas células "A1" e "B1".
Preciso que “L15” tenha uma referência absoluta, também, em outras células (A2:B3), e quando não for possível, opte por uma referência mista (ex. na célula A2: “=L15+ML15” para “$L $ 15+ML $ 15”).
A B C
=L15+L16=L15+L16=M15+M16
=L15+ML15=L15+TL15=M16+M17
=L15+L16=L15+M16=M17+M18

Sub-a10092023()

ThisWorkbook.Activate
Planilhas("Plan1l").Ativar
Intervalo("A1:C10").Substituir o que:="L15", Substituição:="$L$15"

Finalizar sub
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Correcting VBA code:

Sub a10092023()

ThisWorkbook.Activate
Worksheets("Plan1l").Activate
Range("A1:C10").Replace What:="L15", Replacement:="$L$15"

End Sub
 
Upvote 0
A reminder:

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
I clearly understood what I should have done and why I will not be a repeat offender.
I sincerely apologize for what happened.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,539
Messages
6,125,403
Members
449,222
Latest member
taner zz

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