Results 1 to 3 of 3

Find value in cells and copy part of it to other column

Threaded View

  1. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Find value in cells and copy part of it to other column

    Hi, Abjac ,

    find the solution for formulas in the attached workbook.

    Using VBA it could look like this:
    Sub abjdac()
    Dim lngCounter As Long
    For lngCounter = 2 To Cells(Rows.Count, "A").End(xlUp).Row
      With Cells(lngCounter, "A")
        If InStr(1, .Value, "R00") > 0 Then
          .Offset(0, 1).Value = Mid(.Value, InStr(1, .Value, "R00"), 8)
          .Resize(1, 2).Interior.ColorIndex = 43
          Cells(Rows.Count, "C").End(xlUp).Offset(1, 0).Value = .Offset(0, 1).Value
        End If
      End With
    Next lngCounter
    End Sub
    Ciao,
    Holger
    Attached Files Attached Files
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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