+ Reply to Thread
Results 1 to 5 of 5

VBA to copy range of cells to another worksheet

  1. #1
    Registered User
    Join Date
    08-23-2010
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    30

    VBA to copy range of cells to another worksheet

    Hi,

    I am looking for a code that copies A5:C43, A46:C84 from my worksheet "Shops" to another worksheet "Calcs", starting with row 1, column A. I only want to copy if there is a value in column B throughout the range given on worksheet "Shops".

    I have tried a few things from the forum, but i am having trouble.

    Your suggestions would be appreciated.

    Thanks,

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA to copy range of cells to another worksheet

    Something like this:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 02-08-2013 at 03:45 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-23-2010
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: VBA to copy range of cells to another worksheet

    Thank you JBeaucaire, it works great!. I did make one small typo. I wanted the data to start entering in row 2 of column A on sheet "Calcs". I tried changing a few things a few times, but alas I cant make it work. Sorry, this is probably elementary.....

  4. #4
    Registered User
    Join Date
    08-23-2010
    Location
    Alberta, Canada
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: VBA to copy range of cells to another worksheet

    Oh yes, and two more requests.

    1. How can I have a blank row between the two ranges. ie: a blank row to be between the value ranges "B5:B43" and "B46:B84" on my "Calcs" sheet.
    2. How can I bring over just the values of the cells and not the formatting.

    Thanks again.
    Last edited by titantough; 02-08-2013 at 04:27 AM.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA to copy range of cells to another worksheet

    To have blank rows or designate any differences in the rows as groups, you would have to code then separately.

    Please Login or Register  to view this content.

+ 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