Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
The texts are comming in the following format: 5121 W Crystal Ln Santa Ana Ca 927041924 I wrote the following to extract the last piece of text which is Zip code, Option Explicit Sub LastWD() Dim ws As Worksheet Dim lastrow As Long Dim i As Long Dim rng As Range Set ws = Worksheets("United Care") lastrow = ws.Cells(Rows.Count, "F").End(xlUp).Row For i = 1 To lastrow Set rng = ws.Range("F" & i) ws.Range("G" & i).Value = Right(rng, Len(rng) - InStrRev(ws.Range("F" & i).Value, " ")) Next End Sub After copying the Zip code into G column I would like to remove the Zip code and let the text in Column F be "5121 W Crystal Ln Santa Ana Ca" How can I do that? -- Jeff B Paarsa |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text - Remove text Item No.99 (First 2 Chars) and move to end | Excel Discussion (Misc queries) | |||
Easiest way to remove text from a cell that has text and numbers? | Excel Discussion (Misc queries) | |||
Filter text in a column by its Indent, to remove certain text | Excel Discussion (Misc queries) | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions |