+ Reply to Thread
Results 1 to 4 of 4

Copy only cells that contain values from a range cells that contain formulas to next row

  1. #1
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Copy only cells that contain values from a range cells that contain formulas to next row

    Ok,

    I have a sheet - Banking info
    Column A is a list complied of if statement with a true index/match formula and a false "".
    I want to copy the cells with values that are not "" to a column on another sheet - Export Table

    However, with the code I am using below, it copies the 7500 cells each time, so the next time the I need to copy the new entries the macro is listing those at row 7504 and then the next time its at row 15000 ect. Even if there are 1000's of cells in sheet Export table column AV that are empty

    Im not sure if that is making sense, so lets say the list in the column A range contains 10 entries and the rest of the range is empty, I just want it to copy those 10 values, not the whole 7500.
    Please Login or Register  to view this content.
    Incidentally, I have tried taking out the paste formats line, and it still copies all 7500 cells and the next time I run the code Excel sees the first available row at 7504 even though there are many empty above it.

    Any guidance would be very much appreciated.

    Grant
    Last edited by FDibbins; 03-06-2015 at 11:10 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Copy only cells that contain values from a range cells that contain formulas to next r

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have added them for you - this time

    My VBA is weak, but it seems to me that you need to change this part?

    Please Login or Register  to view this content.
    On a side note, there may be a formula-way to do this instead?


    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-16-2014
    Location
    Algiers, Algeria
    MS-Off Ver
    Excel 2003, Excel 2013
    Posts
    33

    Re: Copy only cells that contain values from a range cells that contain formulas to next r

    Hi Grant,
    Not sure what your intensions are, but I think this can help you sort this out:

    Please Login or Register  to view this content.

    Regards.

  4. #4
    Registered User
    Join Date
    10-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Copy only cells that contain values from a range cells that contain formulas to next r

    FDibbins:

    Sorry about the tags. I cannot use a formula for this, at least I dont think so.

    XLrator:

    I am getting the same results.

    My intensions:

    A list of vendors are imported to my excel file, some of these vendors get paid by ACH, the vendor list changes all the time, new vendors are added, old vendors are deleted. So the vendor list is dynamic. I want to store the banking information in the file. So what I have is column a of the Banking sheet lists the vendors that are being paid by ACH. Columns b, c, and d have their banking information. So I want to store this information in ExportTable.

    Then when I re-import vendor information the export table will do a look at all the vendors being paid by ACH, see if the information is already entered via lookup in columns AV-AX, if the vendor info isnt entered it will populate the list of vendors needing info on the Banking column A page. The column A has 7500 formulas, where as the rest of the columns are just a keyboard entry, so the code works perfect with them, but the code will paste the 7500 entries from column A every time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy range to new workbook w/some cells as values & some cells as formulas in new workbook
    By happydayze in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2013, 12:42 PM
  2. Copy and paste values into next sheet. (blank cells contain formulas)
    By Vlad717 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2013, 06:54 AM
  3. macro to copy cells with formulas and paste them as values
    By sammi8796 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2012, 08:00 PM
  4. [SOLVED] VBA Copy a range of cells values using the range of cells in a formula (which will change)
    By murtaep in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 06-05-2012, 07:59 AM
  5. Replies: 2
    Last Post: 05-31-2012, 05:37 AM

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