Possible offset when using vba to keep excel formula

drop05

Active Member
Joined
Mar 23, 2021
Messages
285
Office Version
  1. 365
Platform
  1. Windows
Using VBA or excel but mainly vba

I have code that depending on number a entered in will make copies of a chart created in excel.

I have a formula in a cell in sheet 1 that equals a value in sheet 2. Same workbook. sheet 1 is show below
J1.PNG

sheet 2 looks like
Sheet2.PNG

I am trying to use VBA to keep that formula accurate with the cells needed in sheet 2. The formula changes from =Sheet2E19 to =Sheet2U19 as show below
J2.PNG

I need the formula to be =Sheet2I19 instead of =sheet2U19 and so on so forth (ie sheet2M19, sheet2Q19 etc). So what it is doing is adding 16 characters when needing to only add 4 characters. I am doing this in VBA or if there is an excel formula too, any help would be thankful for
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,713
Messages
6,174,043
Members
452,542
Latest member
Bricklin

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