Forum Discussion
Excel VBA assistance and storing formulas in a table
- Jun 21, 2023
To fix the numbering, change this bit:
If D < 10 Then array192(Z) = x.Offset(0, -1) & "00" & D Z = Z + 1 Else array192(Z) = x.Offset(0, -1) & "0" & D Z = Z + 1 End IfTo this:
array192(Z) = x.Offset(0, -1) & Format(D,"0000")You cannot change the way tables work, to edit their column formulas you must have at least one row with content in any of the cells. When editing a column formula, make sure that:
- The table has at least two rows
- When you edit a formula, make sure to copy it across all rows of that column
To fix the numbering, change this bit:
If D < 10 Then
array192(Z) = x.Offset(0, -1) & "00" & D
Z = Z + 1
Else
array192(Z) = x.Offset(0, -1) & "0" & D
Z = Z + 1
End If
To this:
array192(Z) = x.Offset(0, -1) & Format(D,"0000")
You cannot change the way tables work, to edit their column formulas you must have at least one row with content in any of the cells. When editing a column formula, make sure that:
- The table has at least two rows
- When you edit a formula, make sure to copy it across all rows of that column
- itsmattaJun 21, 2023Copper Contributor
JKPieterse
That code worked! Thank you!I don't think I explain well on the table part. So I'll include photos:
When cell I15 is selected. No formula is displayed. Once data is inputted into cell C15, I15 auto-populates a formula. He said the formula is stored in the table....
- JKPieterseJun 21, 2023Silver ContributorThat is "By design".