+ Reply to Thread
Results 1 to 3 of 3

Trim code to exit code if cell is empty

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Trim code to exit code if cell is empty

    Excellers,

    I am wondering what I am writing incorrectly... perhaps the reference to the range?

    ERROR:
    Run-time error '13': Type mismatch.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thanks for your help!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Trim code to exit code if cell is empty

    You can't use Trim on multiple cells and you can't compare multiple cells to one value like that.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    04-30-2013
    Location
    D.C.
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Trim code to exit code if cell is empty

    So I will have to write a line for individual cell?

    Is there a better way to prevent the code from running if the range (C3:C6) is empty?

+ 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] still have empty cell after run Delete empty cells code
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 04:28 PM
  2. Find next Empty Cell using VBA code.
    By Lensmeister in forum Excel General
    Replies: 2
    Last Post: 09-16-2011, 09:33 AM
  3. VBA code if cell is empty
    By almosala in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-31-2011, 08:46 AM
  4. VBA error code looking for next empty cell
    By jackel007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2010, 10:39 PM
  5. Code to check if cell is empty
    By gshock in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2008, 03:45 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