Excel VBA extend table when data added below table

前端 未结 3 1112
情话喂你
情话喂你 2021-01-22 14:11

I have a table in Excel that when users add data after the table, the data doesn\'t belong to the table.

I\'ve created a code that can be executed to extend the table. T

相关标签:
3条回答
  • 2021-01-22 14:26

    You can change Excel setting to do that :

    File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type and check Include new rows and columns in table

    Or run this line only one time:

    Application.AutoCorrect.AutoExpandListRange = True
    
    0 讨论(0)
  • 2021-01-22 14:32

    Hey I believe this should help!

    good luck .

    http://www.tushar-mehta.com/publish_train/xl_vba_cases/0101%20Create%20a%20self%20adjusting%20range.htm

    0 讨论(0)
  • 2021-01-22 14:47

    You can put your code as a handler for the Worksheet_Change event.

    Arrtice on MSDN

    0 讨论(0)
提交回复
热议问题