#REF errors with updating database connections/Cell references changing

Alistair Braidwood

New Member
Joined
Dec 11, 2012
Messages
4
Good morning,

I'm currently designing a GM calculator for our company, using exported data (csv) from our orders system, then using a database connection to autoupdate the data when the spreadsheet is opened. Next to the data in the cells, I have 4 columns for working out the new/potential GM using a dropdown box of numbers 5-90, then calculating the price based on the data which has been imported.

I am having problems when changing the data to a different customer from our database software, as if there were 10 products, and the data now extends to 20 products, the GM calculator cell references, instead of carrying on say from A10, A11, change to A10, A20, A21. I have no idea why this would be happening apart from the data connection refreshing the data on open. Is there anyway I can make sure the calculation fields always point to the correct ones in another way than putting $A$1, $A$A2 as it's a very long winded way to do, as I have 4 tabs of data and potentially upto 100 products per customer.

Thanks in advance for any help.

Alistair
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Welcome to MrExcel.

I don't think making the references absolute will help. That's only relevant when copying. You could try eg:

=INDEX(A:A,ROW(E1))
 
Upvote 0
Welcome to MrExcel.

I don't think making the references absolute will help. That's only relevant when copying. You could try eg:

=INDEX(A:A,ROW(E1))


Thanks for the welcome. :)

Yes, the absolute references probably wouldn't work. I'm wondering if there's any kind of macro I could write, or settings I could change on the spreadsheet that would stop cell references changing from the correct formula to =(#REF!*100) / (100-H40) when the number of lines of data changes.

Can anyone shed any light on this frustrating problem?

Alistair.
 
Upvote 0
Yes, I've tried the above method, however, when I re-export the data from our database software, and refresh when opening the spreadsheet, for the lines that were not in use before, say after 10, the formula has changed to

=(INDEX(C:C,ROW(#REF!))*100)/(100-(INDEX(H:H,ROW(H17))))
 
Upvote 0
Fantastic!

It looks like it's worked :)

Now, all I need is you to explain why I needed to use a row reference in the same column as the fomula for a bit of knowledge!

Thanks very much Andrew. You've solved a problem I've been working on for a good few hours and didn't look like I was going to solve it any time soon :)

Alistair
 
Upvote 0

Forum statistics

Threads
1,215,463
Messages
6,124,962
Members
449,200
Latest member
indiansth

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