+ Reply to Thread
Results 1 to 5 of 5

Copy rows gives wrong formulas

  1. #1
    Forum Contributor
    Join Date
    06-12-2007
    Posts
    144

    Copy rows gives wrong formulas

    When you click the ADD NEW ROW button on the LINER QUOTE sheet, it copies row 24 on all the sheets and pastes a new one underneath with all the formulas.
    The code is in Module4 - Sub addrows6()

    It all works well except in the LINER ITEM SUMMARY SHEET (blue)
    Columns J to AQ are hidden
    When the first new row is copied, the formulas come out wrong!

    For example H25 refrences H25 on another sheet
    But J25 refrences C26! It should be C25.

    Can anyone figure out why this is happening?

    I have added code to unhide the columns before copying, but that doesnt help...
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-28-2005
    Location
    WI, USA
    MS-Off Ver
    Office XP/2003
    Posts
    95
    Hi,

    I think your problem is the missing tick marks in the name references to other sheets. For example, instead of LINER_QUOTE_CALC!A1, use 'LINER_QUOTE_CALC'!A1.

    I tried this out on a couple cells and it seemed to work fine. Let me know if that doesn't work.

    Chris

  3. #3
    Forum Contributor
    Join Date
    06-12-2007
    Posts
    144
    Don't think so, they seem to dissapear after I put them in.
    (in the LINER ITEM SUMMARY SHEET)

    Probably because the sheet name doesnt have spaces, it has underscores, and therefore doesnt need the ' marks.
    (LINER_QUOTE_CALCS)
    Last edited by treva26; 02-13-2008 at 03:43 AM.

  4. #4
    Forum Contributor
    Join Date
    06-12-2007
    Posts
    144
    It only seems to jump ahead with the first row thats created.
    They all go up by one after that...

  5. #5
    Forum Contributor
    Join Date
    06-12-2007
    Posts
    144

    Smile Solved

    I have solved the problem now.

    The reason was the order of the sheets.
    I was copying a row on a sheet that refrenced cells on another sheet where the new row had not yet been added.
    By changing the order, it fixed the problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1