How to use Offset function when the reference cell changes?

Samanthad2007

New Member
Joined
Aug 12, 2020
Messages
2
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
I want to have the reference cell in the offset function to be the 2nd row of the last used column. I want to have a macro that adds 3 formulas based on where this last column is. For example, my last column right now is DG and when I run the macro, I want it to add 3 formulas in cells DH2, DI2, DJ2. Then the next time I run the macro, I want it to add the formulas in cells DK2, DL2, and DM2.
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

CA_Punit

Well-known Member
Joined
Nov 18, 2019
Messages
884
Office Version
  1. 365
Platform
  1. Windows
Is it necessary to do with a macro. It can be done through formula also.. Getting the last column can be done throgh formula also
 

Watch MrExcel Video

Forum statistics

Threads
1,122,647
Messages
5,597,361
Members
414,139
Latest member
okela0

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