Keep Shape's Reference to a cell when delete the cell

liberovago

New Member
Joined
Sep 6, 2020
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
Hi to all!

I have a shape that is linked with a cell in another sheet.
I need to eliminate the row that contains that cell, and recreate another row.
The fact is that the shape lose the reference with the error #REF. Is there a way to do not lose the reference (For example, the shape is linked with the cell A1 in sheet1. When I delete the row 1 that contains the cell A1, the shape becomes Sheet1!#REF!).
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
First, define a name (Ribbon >> Formuls tab >> Defined Names group >> Define Name) referring to cell A1 in Sheet1. Change the name as desired.

VBA Code:
Name:  MyDefinedName

Refers to:  =INDEX(Sheet1!$A:$A,1)

Click OK

Then, select your shape, and then link it to your cell using the defined name . . .

VBA Code:
=MyDefinedName

Hope this helps!
 
Upvote 0
Solution

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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