+ Reply to Thread
Results 1 to 4 of 4

Inconsistent Performance of cells.value text

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    United Stated
    MS-Off Ver
    Excel 2007
    Posts
    20

    Inconsistent Performance of cells.value text

    I've been using a procedure for over a year without any issues, but ran into one today with the following section

    Please Login or Register  to view this content.
    The code could not find the "Lead Case Manager(s)" field in the range, but it exists. I checked previous data for comparison and there is no difference. So I copied the cell text directly into my code and it works now. Again, I compared the text in the old code to what I just copied into it and it's exactly the same.

    Does anyone have an explanation for this?

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Inconsistent Performance of cells.value text

    Hi,

    Make sure the field doesn't have any leading or trailing spaces or other non-printable characters.

    Instead of the construction you use try:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Inconsistent Performance of cells.value text

    Hello rzrbkpk,

    Difficult to say what the problem was. In my experience, I have seen where headers get corrupted by other users doing copy and paste operations. Other times, people accidentally add a space at the end of header or even a tab name. To avoid space problems, I make it a habit to use the Trim function before doing a compare on either headers or sheet names. Using Select ... Case can make you code easier to read and maintain.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    11-07-2012
    Location
    United Stated
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Inconsistent Performance of cells.value text

    LJMetzger and Leith thanks for the responses. I checked for the leading/trailing spaces and there were none. I will try using both methods suggested for improving my code. I didn't consider use the .text property for the cell. May be possible that the data in the header changed to another format.

+ 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] text to column help need for inconsistent seperator
    By Mile029 in forum Excel General
    Replies: 3
    Last Post: 06-03-2013, 12:19 AM
  2. [SOLVED] Extract Numbers from within Inconsistent Text
    By sebringm in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-28-2013, 05:44 AM
  3. Extracting numbers and text from inconsistent text/number formatted string
    By Brandivil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-25-2013, 01:46 PM
  4. Sorting inconsistent columns of text
    By Cheshire in forum Excel General
    Replies: 0
    Last Post: 11-10-2009, 09:09 PM
  5. Replies: 2
    Last Post: 05-15-2008, 02:55 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