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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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