+ Reply to Thread
Results 1 to 5 of 5

Simplify code

  1. #1
    Forum Contributor KBSH's Avatar
    Join Date
    09-16-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    113

    Simplify code

    Hey

    Is it possible to simplify this code:
    Please Login or Register  to view this content.
    I want to make an efficient (fast) code, but this looks terrible. ....any suggestions?
    I'm mediocre with VBA, but getting there

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,267

    Re: Simplify code

    Hi KBSH,

    Instead of
    Please Login or Register  to view this content.
    try
    Please Login or Register  to view this content.
    See if that makes more sense and works better for you.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor KBSH's Avatar
    Join Date
    09-16-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    113

    Re: Simplify code

    I don't know the code InStr(), but found out that it worked, so thanks. I did actually hope that it would be more something like Activecell.value = OTA

    The thing that I actually ment is that I have to declare twice that I'm looking for characters like "A" "T" and "O"
    Please Login or Register  to view this content.
    Can't this be done with just one line?
    Last edited by KBSH; 03-05-2016 at 03:12 PM.

  4. #4
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    7,851

    Re: Simplify code

    I tried using Instr but for some reason I was getting errors so I decided to use match.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 03-05-2016 at 03:21 PM.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  5. #5
    Forum Contributor KBSH's Avatar
    Join Date
    09-16-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    113

    Re: Simplify code

    Thanks mehmetcik. I didn't know that you can work with numbers in front of your code and refer to those numbers. Very useful

+ 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] simplify vba code
    By wyldjokre69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2014, 10:01 AM
  2. How to simplify code?
    By RaquelAR in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-28-2013, 07:30 AM
  3. [SOLVED] Simplify VBA Code
    By Sky188 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-28-2012, 02:31 PM
  4. Simplify my Code
    By wrathastorm in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 04-26-2012, 02:23 PM
  5. simplify code
    By double a enterprises in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2010, 05:42 AM
  6. hi can anyone simplify this old bit of code
    By khalid79m in forum Excel General
    Replies: 3
    Last Post: 12-28-2006, 01:04 PM
  7. Simplify this code
    By Scott in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2006, 12:00 AM

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