Issue with Referencing when using either $$ or not.

TheWannabe

New Member
Joined
Jan 14, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have a 2 worksheets, worksheet A and worksheet B. In the first worksheet I am keeping all of the data for each week. Every week I have a macro that will insert a new line in worksheet A.
By inserting this new line it means that the information I need for calculations will always be in B5.
In worksheet B I have the following command (=SheetA!$B$5), I have also tried (=SheetA!B5).
If I insert a new row above row 5 which now updates the current B5 cell to be blank. (Data will be manually put into it).
In worksheet B the command =SheetA!$B$5 will automatically update to =SheetA!$B$6 to follow the data even though I want it to stay as =SheetA!$B$5.
The same thing happens if I don't use the absolute referencing with =SheetA!B5.
I have also tried dragging the information down, or cutting it and pasting it in the row below, yet the formula still follows the data rather then staying on the specific cell.

Is there an option that I need to check for this or is it not possible?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Welcome to the MrExcel board!

See if this formula in Sheet B does what you want.
Excel Formula:
=INDEX(SheetA!B:B,5)
 
Upvote 0
Solution
Hi
And welcome
Try
Excel Formula:
=INDIRECT("SheetA!"&ADDRESS(5,2))
 
Upvote 0
You're welcome. Thanks for the follow-up. (y)

For the record, an INDIRECT function formula could also work but being a volatile function INDIRECT is best avoided when there are simple non-volatile options available. :)
Perfect I will look into them for the future but use the =INDEX(SheetA!B:B,5) for now.
 
Upvote 0
You're welcome. Thanks for the follow-up. (y)

For the record, an INDIRECT function formula could also work but being a volatile function INDIRECT is best avoided when there are simple non-volatile options available. :)
Is there would be a way to use the INDEX function with the SUM function? I was trying to go SUM(INDEX(SheetA!B5:E5)).

This would be to get SUM all numbers in a singular row, but when I inserted a new row, it went and followed that data to row 6 rather then stay on row 5.
 
Upvote 0
It would need to be
Excel Formula:
SUM(INDEX(SheetA!B:E,5,0))
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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