Results 1 to 8 of 8

The results are ruining my table/set of data/borders

Threaded View

  1. #1
    Registered User
    Join Date
    11-15-2019
    Location
    England
    MS-Off Ver
    Professional Plus 2019
    Posts
    18

    The results are ruining my table/set of data/borders

    Hi VBA/Excel/IPhreeqcExperts,

    I'm struggling to make this VBA script to work:
    Sub sbCopyRangeToAnotherSheet()
    
        LastColumn = ActiveSheet.UsedRange.Columns(ActiveSheet.UsedRange.Columns.Count).Columns
         
        For n = 63 To 63
        For i = n To n+20
        
           Worksheets("Data").Activate
           Worksheets("Data").Range(Cells(i, 45), Cells(i + 6, 54)).Copy
           
    
           Worksheets("Example").Activate
           Worksheets("Example").Range(Cells(63, 45), Cells(69, 54)).PasteSpecial xlPasteAll
           
           
           Worksheets("Data").Activate
           Worksheets("Data").Range(Cells(i, 45), Cells(i + 6, 54)).Copy
           
           
           Worksheets("Data").Activate
           Worksheets("Data").Range(Cells(i + 20, 45), Cells(i + 20, 54)).PasteSpecial xlPasteAll
           
           RunPhreeqc
           
           Worksheets("Output").Activate
           Worksheets("Output").Range(Cells(2, 20), Cells(8, 29)).Copy
           
           
           Worksheets("Data").Activate
           Worksheets("Data").Range(Cells(i + 10, 45), Cells(i + 16, 54)).PasteSpecial xlPasteAll
          
           
           Next i
        'Application.ScreenUpdating = True
          
     End Sub
    I'm sorry I can't upload the Excel file as it is way too large for it to be posted on here. I really want to get it fixed, but I don't know how to. The results/data keeps overlapping the next set of data/results below, ruining the table/set of data/borders. Many thanks.
    Last edited by djb14128; 11-18-2019 at 02:48 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Put Borders Every 2 Rows Base on Filtered Results
    By allansy8 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2014, 04:06 PM
  2. Replies: 0
    Last Post: 09-05-2012, 06:12 PM
  3. Replies: 3
    Last Post: 02-20-2012, 05:09 PM
  4. Replies: 2
    Last Post: 02-03-2012, 12:13 PM
  5. Replies: 2
    Last Post: 08-29-2011, 12:29 PM
  6. Prevent Copy/paste ruining data validation in shared workbook
    By owlie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2009, 12:28 AM
  7. Dynamic Table Should Always Maintain Borders When Data Is Updated
    By Dynamic Table Should Maintain Borders in forum Excel General
    Replies: 0
    Last Post: 09-09-2005, 05:05 PM

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