Absolute Reference Formula giving wrong value while copying from another worksheet

PritishS

Board Regular
Joined
Dec 29, 2015
Messages
119
Office Version
  1. 2007
Platform
  1. Windows
Dear Sir/Madam,

I'm new to VBA. Trying to learn from internet and previously got best response here at Mr. Excel. I have got a wired kind of problem.

a. I have a worksheet named 'Template'. there I have a table template like below shown.
b. Here 'TOTAL QTY' column have a formula F4=E4*$C$2*$E$2
F5=E5*$C$2*$E$2


A B C D E F
SWITCHBOARD NAME
PCC PANEL
BOARD QTY

FEEDER NAME
630A MCCB Incomer
1
FQTY
2

BOQDESCRIPTION
MAKE
CATALOG NUMBER
PRICE
QTY
TOTAL QTY
630A 4P 55kA MCCB
AVK
3VL5763-1TN4
88390
1
2
Rotary drive
AVK
3VL9600-3HQ00
3530
1
2

<tbody>
</tbody>










c. In another worksheet name 'BAT', I have a button called 'AddTemplate'. When I click this button this above shown entire template table get copied and pasted in 'BAT' worksheet.
d. My problem is when it first time get pasted, it's okay. but second time when I again click on 'AddTemplate' button, table template gets added after last used row. In this case TOTAL QTY absolute formula takes previous table's cell reference.

A B C D E F
SWITCHBOARD NAME
PCC PANEL
BOARD QTY

FEEDER NAME
630A MCCB Incomer
1
FQTY
2

BOQDESCRIPTION
MAKE
CATALOG NUMBER
PRICE
QTY
TOTAL QTY
630A 4P 55kA MCCB
AVK
3VL5763-1TN4
88390
1
2
Rotary drive
AVK
3VL9600-3HQ00
3530
1
2

<tbody>
</tbody>








SWITCHBOARD NAME
PCC PANEL
BOARD QTY

FEEDER NAME
630A MCCB Incomer
1
FQTY
3

BOQDESCRIPTION
MAKE
CATALOG NUMBER
PRICE
QTY
TOTAL QTY
630A 4P 55kA MCCB
AVK
3VL5763-1TN4
88390
1
2
Rotary drive
AVK
3VL9600-3HQ00
3530
1
2

<tbody>
</tbody>










For second Table template 'TOTAL QTY' should be F9=E9*$C$7*$E7$ & F10=E10*$C$7*$E7$
Instead of that the formula is F9=E9*$C$2*$E$2 & F10=E10*$C$2*$E$2

Is there any possibility to achieve this?

Temporarily I have made an arrangement. In 'Template' sheet I wrote the formula without $ like F4=E4*C2*E2
And when the formula have relative reference, I'm getting result as expected.

Please suggest me is there anyway even after copy and paste the template table from 'Template' sheet to 'BAT' sheet.

Help me please!

Thanks
PritishS
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Do you copy/paste or Cut/Paste?
If you Cut/Paste all absolute references to the Cut cells will be adjusted for their new location.
 
Upvote 0
Do you copy/paste or Cut/Paste?
If you Cut/Paste all absolute references to the Cut cells will be adjusted for their new location.

Hello Sir,

I'm doing copy/paste using a macro, which i have assigned to 'AddTemplate' Button.
Shall i try with Cut/Paste? Actually I can not do cut/paste to that table in template as i'm using it as template for future use.

Any suggestion?

Thanks for your valuable time.

Thanks
PritishS
 
Upvote 0
Do you copy/paste or Cut/Paste?
If you Cut/Paste all absolute references to the Cut cells will be adjusted for their new location.

Dear Sir,

As you suggested, I've tried to Cut/Paste the Template table to 'BAT' worksheet with absolute cell reference and as you said-"all absolute references to the Cut cells will be adjusted for their new location", it does happen. But I'm little confused with your last comment-"No, I'm saying do not cut and paste." Here you are saying not to do CUT/PASTE?
If I Copy/Paste the Absolute cell references are not adjusting to their new location. can you please clarify a bit more?

Thanks
PritishS
 
Upvote 0
Hello Sir,

I'm glad to inform you that your suggestion to cut that table from 'Template' sheet and Paste it in 'BAT' page after last use row is working as expected. Now all the absolute formulas changed as per their new location.
I did a little trick. As I said this table in template for future reference. So I made another similar table down in the same 'Template' Sheet and after cut paste I just copied the below table and paste it back in blank space of previous table.

Thank you Very Much for your guidance. Wish you a Good Luck!

Thanks
PritishS
 
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,462
Members
448,899
Latest member
maplemeadows

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