+ Reply to Thread
Results 1 to 14 of 14

Copy worksheet with specific name and no blank cell in a specific range

  1. #1
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Copy worksheet with specific name and no blank cell in a specific range

    Hello,

    I need to create a macro to copy my active sheet and rename the new worksheet with the cell name in R1.

    Also I have some data/formulas in the range C9:K396 (name Manager "FORMM") that I wish to copy but only without blank cells.

    Is it possible to manage both action in a same macro?

    Thanks,
    Graig

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Copy worksheet with specific name and no blank cell in a specific range

    can you attach a sample file with data and desired result ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    I have attached a sample file. So I need to copy the "Current" workbook and rename with the cell R1.

    In the copied workbook (refer the workbook "user1"), I need to remove the R1 cell + the remove the macro buttons and remove in the range name manager (FORMM) the blank or "0".

    I only reproduce the range C9:C396. I need to remove the 0 and blank cell in the entire FORMM name manager.

    Please let me know if you need further information.
    Graig
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Please Login or Register  to view this content.
    That will copy your sheet. I don't get what you mean about not copying blank cells, if it is a blank cell it will be copied as a blank cell...

    Do you mean you want to delete any formulas that return "" or 0 on the new worksheet?

  5. #5
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Correct! I need to get a report without blank cells or cells equal to 0.

    As you can see in the worksheet "consult" I would like to get ride off the cells B10:12, B23:24, B28 and B32:35 as per the example below "INFOSAMPLE1" C8 cell.

    In the cell "user1" I have no "0" or blank cells.

    I hope I am clear enough in my explanations! If not let me know!
    Thanks,

  6. #6
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    PS: I have a bug in the line:
    HTML Code: 

  7. #7
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Thanks.
    the worksheet is properly copied with the correct name. However I still have blank and 0 in the range "FORMM" and the buttons "Reset" & "New Macro" still appear in the new workbook

  9. #9
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Hi, sorry, it's difficult for me to investigate because your worksheet doesn't port well to 2003 (the formulas all use non 2003 functions).

    I'd suggest using the macro recorder to delete your buttons and see what output you get. The bit to delete the 0's looks ok to me though, unless the named range isn't being copied in which case you could try changing Range("FORMM") to Range("C9:K396").

  10. #10
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    When I go on record a macro from the copied file I get that:

    HTML Code: 
    and it does what I need. I just don't know how to implement that macro with yours! :-(

  11. #11
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Well I am using the first macro:
    HTML Code: 
    And once I ran the above macro I need to go to the copied macro and run the below one to get exactly what I need.

    --> I would like to execute automatically the below script when running the first one.. to avoid manual action.. Is it possible?

    HTML Code: 
    Many Thanks,
    Graig

  12. #12
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Yeah that would do :-D do you know how to remove the insert shapes though in the copied workbook only?

  14. #14
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: Copy worksheet with specific name and no blank cell in a specific range

    Done

    HTML Code: 
    thanks!

+ 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. Deleting rows if specific cell is blank or have specific text
    By JoaoFerreira1985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2013, 01:18 PM
  2. Copy and paste specific range to date specific range in alternate sheet
    By alanalmarza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2013, 08:29 AM
  3. Copy data in Specific column in a specific range
    By macrofan2012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-14-2012, 01:27 PM
  4. [SOLVED] Copy TextBox data to Worksheet in specific range
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2012, 07:13 PM
  5. Non-Sheet Specific Macro to copy range of cells to next worksheet in WB
    By Petrolcb41 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-29-2010, 11:04 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