Hi
In column A have some details in that need to extract the test being with " VIA at xy "
extracted value copied to Column B. Through VBA code
excel attached .
Manually fliting method is not comfortable to repeated process.
Hi
In column A have some details in that need to extract the test being with " VIA at xy "
extracted value copied to Column B. Through VBA code
excel attached .
Manually fliting method is not comfortable to repeated process.
Here is a formula that can work: =IF(ISNUMBER(SEARCH("VIA at xy",A1)),A1,"")
Click the * to say thanks.
Do you want to pull out " VIA at xy " or the numbers in parenthesis after that text. I.e, column B, row 39 = "(-140.0513 -29.2162) " ? or just " VIA at xy " ?
I want (-140.0513 -29.2162)
Try
Sub extVal() Dim cel As Range For Each cel In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row) If InStr(cel, "VIA at xy") >= 1 Then cel.Offset(, 1).Value = Mid(cel, InStr(1, cel, "y") + 2) End If Next cel End Sub
the value extracting , but I am looking extracted value copied like B1 B2 B3 etc. not a equal adjacent row.
Please post a file with the expected result. I’m having trouble understanding your requirements.
Image attached for references, results starts from coloumn B1
Give this code a try: I also entered the VDD value in column C and highlighted the first instance of each pair in red.
Sub extVal2() Dim cel As Range For Each cel In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row) If InStr(cel, "Item") >= 1 Then Range(Cells(cel.Row, 2), Cells(cel.Row + 20, 2)) = Mid(cel.Offset(16, 0).Value, InStr(1, cel.Offset(16, 0).Value, "y") + 2) Range(Cells(cel.Row, 3), Cells(cel.Row + 20, 3)) = Mid(cel.Offset(5, 0).Value, InStr(1, cel.Offset(5, 0).Value, ":") + 8) Cells(cel.Row, 2).Font.Color = vbRed Cells(cel.Row, 3).Font.Color = vbRed End If Next cel End Sub
the above code not working, my excepted output entered manually in excel sheet please refer it. excel attached.
in column A have via at xy and part of net name those remaining value extracted to column B &C
Hi,
well elaborate at least your logic as for example the red color does not match the column A …
And do you really need duplicates ?!
This code will populate B and C with each items information once. Let us know if thisis what you are expecting.
Sub extVal3() Dim cel As Range, k& k = 1 For Each cel In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row) If InStr(cel, "Item") >= 1 Then Cells(k, 2) = Mid(cel.Offset(16, 0).Value, InStr(1, cel.Offset(16, 0).Value, "y") + 2) Cells(k, 3) = Mid(cel.Offset(5, 0).Value, InStr(1, cel.Offset(5, 0).Value, ":") + 8) k = k + 1 End If Next cel End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks