Skip to main content
added 53 characters in body
Source Link
r00t
  • 41
  • 3

columns J,K,O are strings and column W is number.

columns J,K,O are strings and column W is number.

Tweeted twitter.com/StackCodeReview/status/1205548112493907968
added 101 characters in body
Source Link
r00t
  • 41
  • 3

EDIT : As mentioned in the comments changed Range("J2:J20000" & jr) to Range("J2:J" & jr)

EDIT : As mentioned in the comments changed Range("J2:J20000" & jr) to Range("J2:J" & jr)

added 34 characters in body
Source Link
r00t
  • 41
  • 3

How could I make this run faster considering there are a lot of rows and combinations to check?

   J     K     O         W
1jobid  dep  job_no   Sequence   
2 aaa   FJ     1         1      <existing data>
3 aaa   FJ     1         2
4 aaa   FJ     1         5
5 aaa   RJ     1         1
6 aaa   RJ     1         9
7 aaa   RJ     1         10     <existing data>
-----------------------------------------------------
8 aaa   RJ     1         11     <after the code is run>run, 11 is assigned>
9 aaa   FJ     1          6     <after the code is run>run, 6 is assigned >

How could make this run faster considering there are a lot of rows and combinations to check?

   J     K     O         W
1jobid  dep  job_no   Sequence   
2 aaa   FJ     1         1      <existing data>
3 aaa   FJ     1         2
4 aaa   FJ     1         5
5 aaa   RJ     1         1
6 aaa   RJ     1         9
7 aaa   RJ     1         10     <existing data>
-----------------------------------------------------
8 aaa   RJ     1         11     <after the code is run>
9 aaa   FJ     1          6     <after the code is run>

How could I make this run faster considering there are a lot of rows and combinations to check?

   J     K     O         W
1jobid  dep  job_no   Sequence   
2 aaa   FJ     1         1      <existing data>
3 aaa   FJ     1         2
4 aaa   FJ     1         5
5 aaa   RJ     1         1
6 aaa   RJ     1         9
7 aaa   RJ     1         10     <existing data>
-----------------------------------------------------
8 aaa   RJ     1         11     <after the code is run, 11 is assigned>
9 aaa   FJ     1          6     <after the code is run, 6 is assigned >
deleted 15 characters in body
Source Link
r00t
  • 41
  • 3
Loading
added 499 characters in body
Source Link
r00t
  • 41
  • 3
Loading
deleted 2 characters in body
Source Link
Ben A
  • 10.8k
  • 5
  • 38
  • 103
Loading
deleted 28 characters in body; edited title
Source Link
Heslacher
  • 51k
  • 5
  • 83
  • 177
Loading
Source Link
r00t
  • 41
  • 3
Loading