+ Reply to Thread
Results 1 to 2 of 2

Determining if sheet has existing data and further actions depending on it

  1. #1
    Registered User
    Join Date
    05-31-2007
    Posts
    49

    Determining if sheet has existing data and further actions depending on it

    Hi

    Here i go again !!!!!! but at least i am getting nearer to the solution.

    I am using a macro to copy and paste data from one workbook to the other workbook.

    Destination workbook has 4 rows of headings. Source workbook only has one row of heading.

    When pasting i would like to check if there is any data in the destination workbook (excluding the headings of course). If there is no data then i would like to continue with the macro and if there is data then i would like a warning message to user giving three options.

    a) one is to continue with the macro and overwrite existing data
    b) second is to exit the macro
    c) third is to append new data the end of existing data

    Can you please help me?

    Cheers

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Use Rows.Count to determine how many rows contain data
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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