+ Reply to Thread
Results 1 to 7 of 7

shorter version of this line of code

  1. #1
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    shorter version of this line of code

    Hi All,

    Need your help again, need to shorten this code.

    Please Login or Register  to view this content.

    Thanks.

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: shorter version of this line of code

    Might quick take on it (untested), but there is probably a better solution using an array

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: shorter version of this line of code

    Or...
    Please Login or Register  to view this content.
    Depends on the actual data. If there's more text in the cell other than 'PersonX' then something like
    Please Login or Register  to view this content.
    might work. Either which way you need to experiment with your actual data.

  4. #4
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: shorter version of this line of code

    cytop that's a beauty! I use like in SQL but not often in VBA. Well until now

  5. #5
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    Re: shorter version of this line of code

    hmm I assume that those codes will only work if the value is between Person A to E?

    Person A to E represents real name though, did place Person A to E for placeholder only.

  6. #6
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: shorter version of this line of code

    this should be editable

    Please Login or Register  to view this content.
    Maybe not condense enough for you though

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

    Re: shorter version of this line of code

    You could always remove the Person part and use Select Case, or perhaps even Application.Match.
    If posting code please use code tags, see here.

+ 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] shorter version of this code
    By aarona in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2017, 01:46 AM
  2. [SOLVED] shorter version of this line?
    By aarona in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2017, 04:51 AM
  3. Replies: 2
    Last Post: 01-08-2014, 10:32 AM
  4. Shorter version of this........
    By wrtrblk in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-20-2013, 12:17 AM
  5. [SOLVED] how to make a long line of VBA code shorter...
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 12:02 PM
  6. Formula too long - Shorter version?
    By Blade2304 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-14-2006, 09:27 AM
  7. shorter version of formula
    By spirodem in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-31-2005, 09:22 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