+ Reply to Thread
Results 1 to 2 of 2

Copy and paste only cells with content, row wise in a new WB

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Copy and paste only cells with content, row wise in a new WB

    I am working with a WORKBOOK (Daily Report.xlsm) which I created. I am using a USER-FORM which have lots of controls, data input options and it sends daily report via mail. This file will be used daily and the entire data captured should be transferred to another workbook (Consolidated Report.xlsx). The entire data captured in first workbook (Daily Report) will be deleted after transferring the data to the second workbook.

    My requirements.

    I want to transfer only cells which have data (value, no formulas) not the empty cells in the range mentioned in the VBA code. Data should be copied to the 2nd WB row by row and with offset.

    Thank you for the help..

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Copy and paste only cells with content, row wise in a new WB

    Hi, wils_mathew,

    maybe lookup the VBA-Help for SpecialCells(Constants, 3) which should narrow down the cells to copy. And for placing them something like the follwoing could be used:

    Please Login or Register  to view this content.
    where lngLast can be used as rownumber into which will be written.

    You didnīt mention if both workbooks will be open by the time of copying data across.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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