Formula in table with referencing problem

ddub25

Well-known Member
Joined
Jan 11, 2007
Messages
625
Office Version
  1. 2019
Platform
  1. Windows
Why does this formula return #REF ! when entered into a table where the formula is referencing cells outside of the table and inside of the table?

=IF(H75="A",
IF(Z75<S6,K75*Z75,
IF(AND(Z75>(S6-1),Z75<(T6-1)),S75*Z75,
IF(AND(Z75>(T6-1),Z75<(U6-1)),T75*Z75,
IF(AND(Z75>(U6-1),Z75<(V6-1)),U75*Z75,
IF(AND(Z75>(V6-1),Z75<(W6-1)),V75*Z75,
IF(AND(Z75>(W6-1),Z75<(X6-1)),W75*Z75,
IF(AND(Z75>(X6-1),Z75<(Y6-1)),X75*Z75,
IF(Z75>=(Y6),W75*Z75,
0)))))))),0)
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
This line seems a little wrong, if Z75 what?

IF(Z75<s6,k75*z75,
IF(AND(Z75>(S6-1),Z75<(T6-1)),S75*Z75,</s6,k75*z75,
 
Upvote 0
The formula works fine outside of the table and returns the correct result so there is no issue with the syntax. When placed inside the table it returns #REF !. I assume it is a problem with the formula no being able to reference values outside of the table when the formula is placed inside the table.
 
Upvote 0
Not too sure but it seems to have an issue referencing from inside what does the formula show in the table if you press F2
 
Upvote 0
Strangely it doesn't allow the formula to remain. I copy the formula from a cell outside of the table (highlighted and copied from the formula bar) and then paste into the cell inside the table (again pasting directly into the formula bar). As soon as I hit return the formula coverts to #REF !.
 
Upvote 0
I have not tried, that would take me a long time, and I can't see why it would. The table just doesn't like the formula whether copied and pasted or written by hand.
 
Upvote 0
I have had this problem many times before, when trying to enter a formula into a table. The formula works fine when placed outside of the table, but as soon as I place it inside the table, it can't reference those values outside of the table. It's a long time since I have written formulas in Excel and can't remember how I solved the problem, but it was done by changing the formula to enable referencing of values outside of a table. Something like wrapping the formula or parts of the formula in a SUM function or something like that. Tried that but cannot get it to work.
 
Upvote 0
Sorry I can't help you more, I have tried to replicate it but can't, I have created table, made it a named ranged, what ever I do I can't make it fail.

Good luck with it.
 
Upvote 0
ok, thanks for your help and going to the trouble of testing it.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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