+ Reply to Thread
Results 1 to 5 of 5

Excel Read Text or String Length and Special Character And Then Correct The Runtime Error

  1. #1
    Registered User
    Join Date
    05-15-2023
    Location
    Malaysia
    MS-Off Ver
    365
    Posts
    10

    Question Excel Read Text or String Length and Special Character And Then Correct The Runtime Error

    Hi guys,

    I am improving my VBA function for creating employee appraisal form.

    The main function is working but facing problem when run the actual dataset.

    Main reason is some employee names too long more than 31 characters while some with special character.

    Is there any solution can implement inside my existing VBA to solve this issue?

    Target to Achieve:
    1) The main dataset (Section_Data) employee name in column must remain the same.
    2) When auto creating employee name sheet can be shorten to 30 characters but the employee name form cell value C5 must have exactly same name as main dataset (Section_Data) column A.
    3) The main dataset (Section_Data) column J10:J formula =IFERROR(INDIRECT("'"&$A10&"'!J51"),"") able to run if the employee name sheet shorten.

    Thanks for advise.
    Attached Files Attached Files
    Last edited by kkng; 05-23-2023 at 10:32 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Excel Read Text or String Length and Special Character And Then Correct The Runtime Er

    Trying to take something as unstructured as a person's name is not a good way to name sheets. Does the sheet tab name really have to be the employee name? I would just number them and create a link to each one on the Section_Data sheet. I have done this for employee training reports. Aside from special characters you also have to worry that once you get a clean name that's 31 characters it will be a duplicate.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-15-2023
    Location
    Malaysia
    MS-Off Ver
    365
    Posts
    10

    Re: Excel Read Text or String Length and Special Character And Then Correct The Runtime Er

    Quote Originally Posted by 6StringJazzer View Post
    Trying to take something as unstructured as a person's name is not a good way to name sheets. Does the sheet tab name really have to be the employee name? I would just number them and create a link to each one on the Section_Data sheet. I have done this for employee training reports. Aside from special characters you also have to worry that once you get a clean name that's 31 characters it will be a duplicate.
    Thanks for your advise, I will give it a try as you suggested.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Excel Read Text or String Length and Special Character And Then Correct The Runtime Er

    Do you need help with it? Like I said, I have done something similar.

  5. #5
    Registered User
    Join Date
    05-15-2023
    Location
    Malaysia
    MS-Off Ver
    365
    Posts
    10

    Re: Excel Read Text or String Length and Special Character And Then Correct The Runtime Er

    Quote Originally Posted by 6StringJazzer View Post
    Do you need help with it? Like I said, I have done something similar.
    Appreciate if you could advise in detail. I can use employee number for sheet name instead of employee name.
    I am struggling with create a link to each sheet in looping and also considering your clean name characters.

+ 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. Replies: 1
    Last Post: 08-02-2017, 01:58 PM
  2. Replies: 2
    Last Post: 12-02-2013, 03:29 PM
  3. Extract text after the LAST special character in a text string
    By phrankndonna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-21-2013, 11:16 AM
  4. [SOLVED] extract string after nth string (special character)
    By itselflearn in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2013, 03:18 PM
  5. String Character Length?
    By koticphreak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2008, 01:08 AM
  6. want to remove all text characters equal to one character in length from text string
    By tinalwalton@yahoo.co.uk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2005, 05:06 PM
  7. want to remove all text characters equal to one character in length from text string
    By tinalwalton@yahoo.co.uk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2005, 08:10 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