Table object declaration causing cells outside of table to change

ALimKW

New Member
Joined
Oct 14, 2020
Messages
1
Platform
  1. Windows
I wrote a code to convert text input files to a structured excel sheet as defined cells and tables

I had created several cells and assigned values through the text input, using csng to convert text to values.
Then I formatted a set of values into a listobject table within the VBA. However, upon the creation of the table, I noticed that some values on cells above the table that is not part of the table changed automatically.
The figure below show the values before the table is converted to a listobject

1602706117162.png


And the figure below shows the data when the table in cell range("B14:F50") is added to the listobject using the following VBA code
ws2.ListObjects.Add(xlSrcRange, ws2.Range(.Offset(0, 0), _
.End(xlToRight).End(xlDown)), , xlYes).Name = "CarRating"

Noticed how the values in cells B7:B8 changed. Incidentally, the values in B6 and B10 did not change even though all four values were created using the same csng function.

1602706283224.png


Hoping you can help explain why the numbers change just from creating a listobject.

Thanks
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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