Structured Reference not working in specific cells

john316swan

Board Regular
Joined
Oct 13, 2016
Messages
59
Office Version
  1. 2019
Platform
  1. Windows
I have tried using vLookup, sumifs, etc to use structured references to lookup values from a table, but it is not working in specific cells. It works everywhere else but I cannot figure out why it is not working! I even tried to write a subroutine to turn it on with those specific cells. I have turned it off, saved the workbook, completely closed excel, opened it back up, turned it on, saved, and completely closed/reopened excel but it still isn't working. Here is the sub I tried but I can't find any information online as to why it is not working in specific cells. Thanks for your help.

VBA Code:
Sub test()
Range("M13:R16").Select

With Selection
    Application.GenerateTableRefs = xlGenerateTableRefStruct
End With

End Sub
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

StephenCrump

MrExcel MVP
Joined
Sep 18, 2013
Messages
4,119
Office Version
  1. 365
Platform
  1. Windows
This is an application level setting, i.e. it applies to all workbooks/all cells, so your Sub Test is actually doing only this:
Code:
Application.GenerateTableRefs = xlGenerateTableRefStruct

What exactly do you mean by "not working"?

Do you realise that toggling between xlGenerateTableRefStruct and xlGenerateTableRefA1 won't affect existing formulae?
 

john316swan

Board Regular
Joined
Oct 13, 2016
Messages
59
Office Version
  1. 2019
Platform
  1. Windows
When i write a formula in specific cells, it won't reference the table structure reference in the formula...when I go to different cells within the same sheet it does work! Strangest thing. So, i ended up writing the formula in a cell where it was working, and then I pasted the formula in the cells it wasn't working and voila it worked. Weirdest thing ever. I restarted excel and my computer and tried it in an rdp server but still wouldn't work until I just copied and pasted.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,500
Messages
5,625,157
Members
416,075
Latest member
TechJosh

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
Top