Results 1 to 4 of 4

VBA "& Cells(Rows.Count)" problem - copying outside of range

Threaded View

Dgp2012 VBA "& Cells(Rows.Count)"... 06-26-2014, 04:25 AM
romperstomper Re: VBA "& Cells(Rows.Count)"... 06-26-2014, 04:33 AM
Dgp2012 Re: VBA "& Cells(Rows.Count)"... 06-26-2014, 05:06 AM
romperstomper Re: VBA "& Cells(Rows.Count)"... 06-26-2014, 05:18 AM
  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    39

    VBA "& Cells(Rows.Count)" problem - copying outside of range

    Hi

    I have a code which copies a formula down as far as a list of products go, some days there will be no products generated in this list and that’s when I come across the problem of the top row being overwritten by the macro formula.

    I have attached a sample workbook which may better explain my query. If you run the test with the products listed it works fine, if you then clear all data from Row 2 onwards and run again, the macro replaces the top row. I would like to amend my code to stop overwriting the top row!

    Can anybody help me understand where my code is going wrong?! Any help would be greatly appreciated

    Dan
    Attached Files Attached Files
    Last edited by Dgp2012; 06-26-2014 at 05:07 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. range("e1" & cells(rows.Count,5).end(xlup)).Select
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-09-2014, 09:27 AM
  2. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. Problem using "Cells" in "Range" "400" error
    By johnnywinter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2009, 05:46 PM
  5. Why does =countif(range,"<>""") count empty cells?
    By Ingeniero1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-16-2008, 01:40 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