How to dummy proof cut/paste from killing absolute references?

WSBirch

Board Regular
Joined
Apr 10, 2018
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Excel Formula:
{=IFERROR("("&LEFT(VLOOKUP(VLOOKUP($B$1,IF('[PA Container Schedule.xlsm]Schedule'!$D$2:$D$5000=$B$2,'[PA Container Schedule.xlsm]Schedule'!$A$2:$E$5000,""),5,FALSE),'[PA Container Schedule.xlsm]Schedule'!$E:$J,6,FALSE),3)&") ","("&$D$2&") ")&IFERROR(VLOOKUP($B$1,IF('[PA Container Schedule.xlsm]Schedule'!$D$2:$D$5000=$B$2,'[PA Container Schedule.xlsm]Schedule'!$A$2:$E$5000,""),5,FALSE),$E$2)}

Good afternoon,
I have the above array formula running in C2. The formula is copied down from C2:C69, with absolute references from D2 and E2 respectively. The formula runs down the C column, but we have folks entering data manually into D and E columns. As an example, they'll enter the correct data into cell D6 and E6, but then immediately realize they meant to enter it into D7 and E7 and they'll immediately defer to using cut/paste from D6:E6 to D7:E7, or the like, instead of copy/paste. However, every time they cut/paste data like that, it breaks the array's absolute reference. If they cut from D6:E6 and paste to D7:E7, then the array formula in C7 throws a reference error because it loses the absolute reference to D7:E7 and the array formula in C7 looks like this:
Excel Formula:
{=IFERROR("("&LEFT(VLOOKUP(VLOOKUP($B$1,IF('[PA Container Schedule.xlsm]Schedule'!$D$2:$D$5000=$B8,'[PA Container Schedule.xlsm]Schedule'!$A$2:$E$5000,""),5,FALSE),'[PA Container Schedule.xlsm]Schedule'!$E:$J,6,FALSE),3)&") ","("&#REF!&") ")&IFERROR(VLOOKUP($B$1,IF('[PA Container Schedule.xlsm]Schedule'!$D$2:$D$5000=$B8,'[PA Container Schedule.xlsm]Schedule'!$A$2:$E$5000,""),5,FALSE),#REF!)}

Sure, I could go around and send a company wide email "Hey don't ever use cut/paste" but there's always going to be someone and I'm tired of babysitting the formulas. If the references keep getting killed even though they're absolute, what options do I have for them to continue their ways of cut/paste but also not break the formulas?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Does your workbook have macros? One way is to use a macro to repair or 'refresh' the formulas in column C when needed.
 
Upvote 0
It doesn't, but it could. Unless there's a better option, I might just have to do that. It would cut down on me at least manually updating each cell that gets broken.
 
Upvote 0
Are you using this formula in versions of Excel prior to 365?
 
Upvote 0
Thanks...and are the values in B (except for $B$1), D, and E supposed to be relative...that is, all of them on the same row apply to the formula in C?
 
Upvote 0
Thanks...and are the values in B (except for $B$1), D, and E supposed to be relative...that is, all of them on the same row apply to the formula in C?
Yes. All on the same row except for $B$1. Any value in D and E get applied to C. D20 and E20 are relative to C20, and so on
 
Upvote 0
and in your example, B20 would also be applied to C...where this type of construction is used as a condition to find the correct row in the Schedule sheet... (Schedule!$D$2:$D$200=$B20)...I've shortened the range for debugging, but that $B20 would go with D20 and E20 for the formula in C20?
 
Upvote 0
Yep. The only cell that actually needs to be absolute is the $B$1. "VLOOKUP($B$1". I have the formula otherwise setup to just all be absolute because I was hoping that if all of the cells are absolute, then a cut/paste wouldn't affect it, given the cell value it's looking at it absolute, but that hasn't been the case. I actually prefer if they're not all absolute references.
 
Upvote 0
I suppose this is one idea worth investigating:
 
Upvote 0

Forum statistics

Threads
1,215,790
Messages
6,126,923
Members
449,348
Latest member
Rdeane

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