Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #107887
| From | Claus Busch <claus_busch@t-online.de> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Q to Automate Removal of Characters from Cells |
| Date | 2015-07-25 13:25 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <movrli$qt4$1@dont-email.me> (permalink) |
| References | (4 earlier) <fd365fc0-ea66-40c4-afd3-654e0bc60507@googlegroups.com> <movn7u$dld$1@dont-email.me> <3d589546-9224-4c89-88bf-76826d622828@googlegroups.com> <movp4i$j35$1@dont-email.me> <81d4a933-47cc-4998-9e70-5c431ede202c@googlegroups.com> |
Hi,
Am Sat, 25 Jul 2015 04:01:53 -0700 (PDT) schrieb edgetown70@gmail.com:
> One other twist, in Column E, I have similar format, except it doesn't have the - (minus sign) e.g " EURO 659.00
>
> How could I also run the code over this column?
try:
Sub Replace()
Dim LRow As Long
Dim rngC As Range
LRow = Cells(Rows.Count, 4).End(xlUp).Row
For Each rngC In Range("D2:D" & LRow)
If InStr(rngC, "-") Then
rngC = Mid(rngC, InStr(rngC, "-"))
End If
Next
For Each rngC In Range("E2:E" & LRow)
If InStr(rngC, "EURO") Then
rngC = Mid(rngC, InStrRev(rngC, " "))
End If
Next
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
Back to microsoft.public.excel.programming | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Q to Automate Removal of Characters from Cells Claus Busch <claus_busch@t-online.de> - 2015-07-25 13:25 +0200
Re: Q to Automate Removal of Characters from Cells edgetown70@gmail.com - 2015-07-25 05:11 -0700
Re: Q to Automate Removal of Characters from Cells Claus Busch <claus_busch@t-online.de> - 2015-07-25 14:26 +0200
csiph-web