+ Reply to Thread
Results 1 to 7 of 7

Check if cell is not empty and checks if worksheets already exists

  1. #1
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Check if cell is not empty and checks if worksheets already exists

    I have three worksheets in a workbook namely "Client", "Collections" & "Interest". I want to use data from these worksheets to create new worksheets and also populate the corresponding values. As a start i manage to create new worksheets but it is also creating worksheets with no tab name. Please help me fix this:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by arlu1201; 03-19-2014 at 12:50 AM. Reason: Use code tags in future.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Check if cell is not empty and checks if worksheets already exists

    Note that I am answering in post edited by arlu1201. She added code tags as required by forum rules - please follow our rules in the future.

    creating worksheets with no tab name
    This leads to conclusion: Probably not empty but with space or other nonprinting character. So let;s try to get rid of it with function trim.
    Please Login or Register  to view this content.
    I made some other minor corrections - check if they work right.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    PS. I Assume that A1 in a comment is less important than B6 in code
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Check if cell is not empty and checks if worksheets already exists

    Thanks kaper, appreciated. Fixed.

  4. #4
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Check if cell is not empty and checks if worksheets already exists

    instead of printing the sheet tab name to all active sheets, i wanted to print to the new created sheets only there for i issued:

    ws.Range("B6") = ActiveSheet.Name

  5. #5
    Registered User
    Join Date
    03-18-2014
    Location
    port vila, vanuatu
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Check if cell is not empty and checks if worksheets already exists

    Modified to so that printing on B6 only applies to new worksheets

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by rskay14; 03-20-2014 at 07:01 PM.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Check if cell is not empty and checks if worksheets already exists

    I kindly tried to focus your attention to code tags use:
    Note that I am answering in post edited by arlu1201. She added code tags as required by forum rules - please follow our rules in the future.
    As you do not care, I am reporting your post. Wondering why? see rule 3 in http://www.excelforum.com/forum-rule...rum-rules.html

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check if cell is not empty and checks if worksheets already exists

    Thanks Kaper.

    rskay14

    Welcome to the forum. Pls take some minutes and read forum rules. In your first post, Admin added code tags to your code, asking next time to do yourself. Seems that you choose to ignore that kind warning. So to make it more clear.


    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



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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] checks if row is blank, if not puts zero in first cell of row if cell is empty
    By synergio in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-13-2012, 10:19 AM
  2. macro that checks if the content of a given cell range exists in a Word file
    By Vogelmann in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2012, 03:55 AM
  3. [SOLVED] check if worksheet already exists when auto creating worksheets form a list
    By y0rk1e72 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-06-2012, 04:53 PM
  4. if check box is marked that it also checks another cell
    By AGoldy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2010, 03:49 PM
  5. Micro that checks if file exists
    By pete in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-24-2005, 01:06 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