how to stop data shifting into new cells every time workbook is o.

J

Jane G

Some of my Data remains the same in my workbook but then columns H- shifts
into different cells after I've saved the sheet and then I reopen to work in
it again.
 
J

JLatham

About the only way that I can think of that data would physically move from
any column into another 'magically' is through VBA code (a macro).

I'd look for code associated with one of the following:
ThisWorkbook
or the worksheet this is happening to.

To look for the code, open the workbook and go to the sheet where it is
happening and Right-click on the worksheet's name tab and choose [View Code]
from the list that appears.

If you see code in the module that opens up, that's probably what is doing
it to you.

If you don't see code in the module that opens, then look in the
ThisWorkbook object: Press [Ctrl]+[R] to make sure the VBA Project window is
open in the VB Editor. It will have a label at the top of it like: Project
- VBAProject (although the VBAProject portion could be different). If the
list of 'Microsoft Excel Objects' is not expanded, click the [+] sign to
expand it and then double-click on the ThisWorkbook object that you will find
at the bottom of that list.

Again, if you see code, that's probably what's doing it to you.

The easiest non-permanent way to deal with any of the code you find is to
type in the statement
Exit Sub
on a line immediately following the statement that looks something like:

Private Sub Worksheet_Activate()
or
Private Sub Workbook_Open()
or
Private Sub Workbook_BeforeClose()

Obviously these aren't all the possible 'Private Sub' entries, but are some
of the more likely ones.

If you do find code and want to find out how to edit/alter it or simply to
find out what it is doing, copy the code and paste it into a new posting here
asking simply "What does this code do".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top