Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Do Until Loop with (somehwat) concatenate Looking to place the concatenated valu

ID: 3560954 • Letter: D

Question

Do Until Loop with (somehwat) concatenate

Looking to place the concatenated values from columns C, K, L, M, N, & date to column B and expand down the rows until cell C# is blank. What is the best way to update the VBA below?

-----

Range("C2").Select

Do Until IsEmpty(ActiveCell)
Range("B2").Value = Range("C2").Text & " - " & Range("K2").Text & " - " & Range("L2").Text & " - " & Range("M2").Text & " - " & Range("N2").Text & " - " & Date
ActiveCell.Offset(1, 0).Select
Loop

-----

Explanation / Answer

%Try this version:?<><

    Dim r As Long
    r = 2
    Do Until Range("C" & r).Value = ""
        Range("B" & r).Value = Range("C" & r).Text & " - " & _
            Range("K" & r).Text & " - " & Range("L" & r).Text & " - " & _
            Range("M" & r).Text & " - " & Range("N" & r).Text & " - " & Date
        r = r + 1
    Loop

=====

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote