Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
Convert VB Loop to Javascript

I'm trying to get this to work in Javascript. It works fine in Visual Basic. How do I properly call out the correct rows and columns for the loop to work?

Dim i As Integer, j As Integer, k As Integer
i = 2
j = 6
k = 1

Do While k < 200
    If Cells(i, j) <= Sheets("Outlines").Cells(1, 8) Then
        Cells(i, j - 3) = Cells(i, j)
        Cells(i, j - 2) = Application.VLookup(Cells(i, j - 5), Sheets("View").Range("A2:P48"), 4, False)
        Cells(i, j - 1) = Application.VLookup(Cells(i, j - 5), Sheets("View").Range("A2:P48"), 5, False)
    End If
    i = i + 1
    k = k + 1
Loop
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

1 to one conversion assuming the VBCalls have lowerCase JS equivalents

let i = 2, j = 6, k = 1;

while (k < 200) {
  if (cells(i, j) <= sheets("Outlines").cells(1, 8)) {
    cells(i, j - 3) = cells(i, j)
    cells(i, j - 2) = application.VLookup(cells(i, j - 5), sheets("View").range("A2:P48"), 4, false)
    cells(i, j - 1) = application.VLookup(Cells(i, j - 5), sheets("View").range("A2:P48"), 5, false)
  }
  i++;
  k++;
}
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!