Cell Format Changing

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,598
Office Version
  1. 365
Platform
  1. Windows
I am using a loop to populate multiple cells on a cell by cell basis and some of the cell formats are changing to a date format despite being formatted as a number.

This seems to happen for a block of cells in a column and also formats a number in a call in the column that isn't manipulated via the code. I.e. the code starts to added data from row 8 but some values I have in row 4 (that holds the column numbers I need to pass into the code) also get changed.

It doesn't apply the date formats to all the cells in a column and will stop after what seems to be a consistent 10 rows, so rows 4 to 18 are changed to a date format.

I am at a complete loss as to why this is happening and I don't want to add additional code to amend the cell format as there are potentially 120+ columns and 10k rows where data can be added.


TIA
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,213,487
Messages
6,113,937
Members
448,534
Latest member
benefuexx

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