+ Reply to Thread
Results 1 to 3 of 3

Thread: copy column of data from one sheet to another

  1. #1
    Registered User
    Join Date
    01-21-2012
    Location
    united States
    MS-Off Ver
    Excel 2010
    Posts
    15

    copy column of data from one sheet to another

    when i copy a column of data from sheet1 to sheet2 the cells that contain data come across ok. But those cells that are blank come across as a 0. I need them to be blanks. What is the proper procedure to the transfer

  2. #2
    Forum Contributor
    Join Date
    09-16-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel XP, 2003, 2010
    Posts
    126

    Re: copy column of data from one sheet to another

    Lo there Genebu,

    There are many ways you can do this depending on various factors. For instance, when you copy the data over to the next sheet, are the resulting values needing to be updated depending on what's been entered into the corresponding cells in the reference sheet?

    As mentioned, many ways, many explanations. Best to take a look at this very helpful page:

    http://office.microsoft.com/en-us/ex...005199879.aspx

    All you need to know about hiding 0 values.

    Enjoy

    Hope this helps.

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    825

    Re: copy column of data from one sheet to another

    as an option
    in yr copy procedure you can add this
    Sub Button2_Click()
    With Sheets("Sheet1")
    'change Sheet and column for yr needs
         .Columns("E").Replace What:="0", Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByColumns, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
            End With
    End Sub
    or
    just play with it and see what it does...
    Sub Button2_Click()
    Sheets("Sheet1").Columns("e").Copy Sheets("Sheet2").Range("e1")
    With Sheets("Sheet2")
         .Columns("E").Replace What:="0", Replacement:=""
    End With
    End Sub
    Last edited by john55; 01-25-2012 at 04:18 PM.
    Regards, John

+ 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.2.0