+ Reply to Thread
Results 1 to 14 of 14

Slow process

  1. #1
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Slow process

    Hello there,

    I've encountered a process as to which I need to sort and arrange things using an excel document to make a program for a machine.

    Unfortunately, the way I do it is long winded and slow, I was wondering if there is another way to do it.

    The way I do it is spread the numbers out in column D by inserting new rows, and typing all the numbers which takes a long time, in a column, like the example at the bottom of this screenshot.

    Then I highlight and drag the other cells so that the circuit ref matches the PN's involved.

    Problem.png

    Any help would be appreciated, thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,440

    Re: Slow process

    So, you want to split the entries which are in column D so that each entry appears on a different row?

    It would help if you attached a sample Excel workbook, as I do not fancy typing your data in before I can make a start.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Please note that the Paperclip icon (Attachments button) does not work on this forum, so don't bother trying it that way.

    Hope this helps.

    Pete

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Slow process

    This is column D, third row: R1-R8 R135-R150
    Is this split into 2 rows, or 24 (8 + 16)?
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Slow process

    Still need answer to post #3 question. For now, I'm assuming 2 rows w/ R1-R8 and R135-R150. Output is placed on a new sheet:
    Please Login or Register  to view this content.
    Last edited by leelnich; 03-02-2018 at 10:46 AM.

  5. #5
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    Thanks for the information Pete, about uploading the file, I have a test model uploaded now.

    The answer for column D is it is split into 24 rows unfortunately, if there is a way to do that.

    sorry for the long reply, been rather busy with other things at work.

    I'm aiming to split the entries into separate rows on the same sheet, but if that can't be done, a different sheet will be brilliant as well.

    Thanks again
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Slow process

    Here's how I read your problem.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    That works wonders, thanks alot

  8. #8
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Slow process

    I left the Copy line in so you could verify output. Once you're satisfied the process works, remove it.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    That's brilliant, thanks very much

  10. #10
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    Worked with 3 sheets so far, was going great, but then I encountered a problem

    For k = CInt(Lo) To CInt(Hi)

    That is being highlighted when I go onto the debug screen, is there anything I've done wrong?

    I'm using Leelnichs version as it is slightly better, for what I need.
    Last edited by Benjic; 03-05-2018 at 08:00 AM.

  11. #11
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Slow process

    When the code finds a hyphen, it builds number strings Lo and Hi. Lo starts from left of the hyphen and moves leftward, adding characters until it encounters a non-numeric value. Hi does the same, but starts at the end of the string. At a guess, one of them is immediately hitting a non-number, and so is = "". That's not a number, so you get a type mis-match error.

    In Debug mode, check values of the following variables by hovering the cursor over them:
    i - the row number -1 of the problem value
    s(j) - the problem value
    Lo, Hi - numbers - bottom and top of the range. If one equals "", you'll need to fix the source value and try again.

    Let me know if you find the problem.
    Last edited by leelnich; 03-05-2018 at 08:54 AM.

  12. #12
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    I found the problem, thanks for the help, the problem was is we use sensors, and they are labeled as SENSEA-SENSEC the A-C is what it didn't like I think.

    It also didn't like another thing in the document, which was GND1A-GND1H which isn't a commonly used thing for us, but it's on a few things here, is there any way to make it work around those, or include them in any way?

  13. #13
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Slow process

    Try this. It advances single letters (A, B, C ...) just like numbers (1, 2, 3 ...):
    Please Login or Register  to view this content.
    PS- Don't forget, all commas AND spaces signal new lines.
    Last edited by leelnich; 03-05-2018 at 10:40 AM.

  14. #14
    Registered User
    Join Date
    03-02-2018
    Location
    Blyth, England
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Slow process

    That works wonders, thank you very much!

+ 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. Very Slow Process Code
    By webiscore in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2017, 07:03 PM
  2. Data Entry Process is Slow
    By rana19 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-02-2015, 01:52 AM
  3. Vertical grouping & ungrouping process slow
    By Gti182 in forum Excel General
    Replies: 2
    Last Post: 09-30-2014, 12:53 PM
  4. VBA Slow Process
    By mcmunoz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-23-2013, 10:41 PM
  5. [SOLVED] Slow process to replace blocks of zeros with null
    By Ariostea in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-27-2012, 10:49 PM
  6. VBA code slow to process. asynchronous fetch for sql statement?
    By tasxj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2012, 05:02 AM
  7. Slow process in calculation in cell
    By Lewis Koh in forum Excel General
    Replies: 0
    Last Post: 08-23-2010, 03:32 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